]> git.rmz.io Git - dotfiles.git/blobdiff - vimrc
move battery notification to the top_right
[dotfiles.git] / vimrc
diff --git a/vimrc b/vimrc
index ceab90ef251eca9051a49c4d31686b6b6f250eed..7844cbb298e4757946572ced9f5bcd83217d9674 100644 (file)
--- a/vimrc
+++ b/vimrc
@@ -5,9 +5,6 @@
 
 filetype plugin indent on
 
 
 filetype plugin indent on
 
-" pathogen.vim runtime path manipulation
-silent! call pathogen#infect()
-
 " moving around, searching and patterns {{{1
 set incsearch           " show match for partly typed search command
 set ignorecase          " ignore case when using a search pattern
 " moving around, searching and patterns {{{1
 set incsearch           " show match for partly typed search command
 set ignorecase          " ignore case when using a search pattern
@@ -18,6 +15,8 @@ set hlsearch                    " highlight all matches for the last used search
 nmap <silent> <Leader>n :silent nohl<CR>
 " use leader-# to display the number of matches for the last search
 nmap <Leader># :%s:<C-R>/::gn<CR>
 nmap <silent> <Leader>n :silent nohl<CR>
 " use leader-# to display the number of matches for the last search
 nmap <Leader># :%s:<C-R>/::gn<CR>
+" center cursor after search
+nnoremap n nzz
 
 set nostartofline       " don't  move the cursor to the first non-blank char of a line
 set path=.,**           " current + subdirectory search for :find, :grep:, ...
 
 set nostartofline       " don't  move the cursor to the first non-blank char of a line
 set path=.,**           " current + subdirectory search for :find, :grep:, ...
@@ -107,6 +106,18 @@ set nrformats=hex               " number formats recognized for CTRL-A and CTRL-
 " whether to use a popup menu for Insert mode completion
 set completeopt=longest,menuone,preview
 
 " whether to use a popup menu for Insert mode completion
 set completeopt=longest,menuone,preview
 
+" Indent if we're at the beginning of a line. Else, do completion.
+function! InsertTabWrapper()
+  let col = col('.') - 1
+  if !col || getline('.')[col - 1] !~ '\k'
+    return "\<Tab>"
+  else
+    return "\<C-N>"
+endif
+endfunction
+inoremap <Tab> <C-R>=InsertTabWrapper()<CR>
+inoremap <S-Tab> <C-P>
+
 " fix legacy vi inconsistency
 map Y y$
 
 " fix legacy vi inconsistency
 map Y y$
 
@@ -174,6 +185,8 @@ set virtualedit=block           " let cursor move past last char in <C-V> mode
 set viminfo='100,<50,s10,h,n~/.vim/viminfo " viminfo defaults but save file in .vim
 
 " plugins {{{1
 set viminfo='100,<50,s10,h,n~/.vim/viminfo " viminfo defaults but save file in .vim
 
 " plugins {{{1
+silent! call pathogen#infect()  " pathogen.vim runtime path manipulation
+
 " airline {{{2
 let g:airline_detect_whitespace=2
 let g:airline_whitespace_symbol = 'Ξ'
 " airline {{{2
 let g:airline_detect_whitespace=2
 let g:airline_whitespace_symbol = 'Ξ'
@@ -227,15 +240,3 @@ if !exists(":DiffOrig")
   command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
                   \ | wincmd p | diffthis
 endif
   command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
                   \ | wincmd p | diffthis
 endif
-
-" Indent if we're at the beginning of a line. Else, do completion0.
-function! InsertTabWrapper()
-  let col = col('.') - 1
-  if !col || getline('.')[col - 1] !~ '\k'
-    return "\<tab>"
-  else
-    return "\<c-p>"
-endif
-endfunction
-inoremap <tab> <c-r>=InsertTabWrapper()<cr>
-inoremap <s-tab> <c-n>