Skip to content

Commit

Permalink
vim
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilalh committed Apr 14, 2015
1 parent 88e3564 commit 0411349
Showing 1 changed file with 63 additions and 60 deletions.
123 changes: 63 additions & 60 deletions .nvimrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@

" Plugins {{{
" Make sure you use single quotes

" Install vim-plug if it does not exist
if empty(glob('~/.nvim/autoload/plug.vim'))
silent !curl -fLo ~/.nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall
endif

" Plugins {{{
call plug#begin('~/.nvim/plugged')

" Make sure you use single quotes
call plug#begin('~/.nvim/plugged')

Plug 'benekastah/neomake'

Expand Down Expand Up @@ -49,23 +50,25 @@ Plug 'elzr/vim-json'
call plug#end()
" }}}

" Syntax checking
autocmd! BufWritePost * Neomake
" Color scheme
silent! colorscheme wombat256mod
" With a map leader it's possible to do extra key combinations
let mapleader = ","
let g:mapleader = ","

" Leader key timeout
set tm=2000

" Allow mouse use"
set mouse=a
" Don't show mode changes
set noshowmode

" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
let g:mapleader = ","
" Syntax checking
autocmd! BufWritePost * Neomake
" Color scheme
silent! colorscheme wombat256mod



" Leader key timeout
set tm=2000
" Allow the normal use of "," by pressing it twice
noremap ,, ,
Expand All @@ -82,6 +85,35 @@ set number
set backspace=eol,start,indent
set whichwrap+=<,>,h,l

" Always show the status line
set laststatus=2

" Use Cedilla ¸ as the trailing whitespace char
set listchars=tab:‣\ ,trail:¸
set list

" Line wraping
set showbreak=

let g:indentLine_enabled =0

" Pressing ,ss will toggle and untoggle spell checking
map <leader>ss :setlocal spell!<cr>
" Treat long lines as break lines (useful when moving around in them)
nnoremap j gj
nnoremap k gk
" Remember info about open buffers on close
set viminfo^=%

" jump to tag in new tab
noremap ,ct <C-w><C-]><C-w>T
"sane sys paste
set pastetoggle=<F2>


" Searching {{{

" Ignore case when searching
Expand All @@ -108,6 +140,19 @@ nmap <silent> <leader><cr> :noh\|hi Cursor guibg=red<cr>
" }}}

" File Search {{{

" dash search
nmap <silent> <leader>d <Plug>DashSearch

" Fuzzy find files
" nnoremap <silent> <Leader><space> :Unite file_rec/neovim<CR>
nnoremap <silent> <Leader><space> :FZF<CR>
nnoremap <Leader>w :IndentLinesToggle<CR>
"}}}

" Spacing {{{

" Use spaces instead of tabs
Expand All @@ -121,6 +166,9 @@ set shiftwidth=4
set tabstop=4
set softtabstop=4

autocmd BufRead,BufNewFile *.py set tabstop=4 shiftwidth=4 softtabstop=4
autocmd BufRead,BufNewFile *.rb set noexpandtab tabstop=2 shiftwidth=2

" }}}

" Auto completion {{{
Expand All @@ -135,28 +183,7 @@ let g:neocomplcache_enable_smart_case=1

" }}}

" Always show the status line
set laststatus=2

" Use Cedilla ¸ as the trailing whitespace char
set listchars=tab:‣\ ,trail:¸
set list

" Line wraping
set showbreak=

let g:indentLine_enabled =0


" Pressing ,ss will toggle and untoggle spell checking
map <leader>ss :setlocal spell!<cr>

" Treat long lines as break lines (useful when moving around in them)
nnoremap j gj
nnoremap k gk
" jump to splits {{{
" Jump to splits {{{
noremap <c-h> <c-w>h
noremap <c-k> <c-w>k
noremap <c-j> <c-w>j
Expand Down Expand Up @@ -211,20 +238,6 @@ if has("autocmd")
endif
" }}}


" Remember info about open buffers on close
set viminfo^=%

" jump to tag in new tab
noremap ,ct <C-w><C-]><C-w>T
"sane sys paste
set pastetoggle=<F2>


autocmd BufRead,BufNewFile *.py set tabstop=4 shiftwidth=4 softtabstop=4
autocmd BufRead,BufNewFile *.rb set noexpandtab tabstop=2 shiftwidth=2

" Whitespace {{{

" Delete trailing white space on save
Expand All @@ -240,24 +253,14 @@ augroup whitespace
augroup END
" }}}

" undo {{{
" Undo {{{
set undofile " Save undo's after file closes
set undodir=$HOME/.nvim/undo " where to save undo histories
set undolevels=1000 " How many undos
set undoreload=10000 " number of lines to save for undo

" }}}

" dash search
nmap <silent> <leader>d <Plug>DashSearch

" Fuzzy find files
" nnoremap <silent> <Leader><space> :Unite file_rec/neovim<CR>
nnoremap <silent> <Leader><space> :FZF<CR>
nnoremap <Leader>w :IndentLinesToggle<CR>
" Airline {{{

if !exists('g:airline_symbols')
Expand Down

0 comments on commit 0411349

Please sign in to comment.