Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Save minor updates

  • Loading branch information...
commit c845923c957aff537136e5bd92f719f199a07d07 1 parent 0f99a74
@clochix authored
Showing with 54 additions and 8 deletions.
  1. +54 −8 vimrc
View
62 vimrc
@@ -6,12 +6,14 @@ call pathogen#runtime_append_all_bundles()
" }
" Filetype {
"
-filetype on " enable file type detection (to force a specific filetype :set filetype=html)
+filetype on " enable file type detection (to force a specific filetype :set filetype=html)
filetype plugin on " load the plugins for the file type
filetype indent on " load the indent for the file type
au BufNewFile,BufRead *.yaml,*.yml setfiletype yaml " for YAML files
+au WinEnter * checktime " everytime we change window, check if file has been updated outside of the editor
+autocmd FileType markdown set spell spelllang=fr
" }
-" Completion {
+" Completion
"
set omnifunc=syntaxcomplete#Complete
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
@@ -37,6 +39,7 @@ set encoding=UTF-8 " Display UTF-8
set fileencoding=UTF-8 " Speak UTF-8
set hidden " allow to hide buffer without writing changes
set history=100 " command line history
+set hlsearch " highlight search
set ignorecase " ignore case in search
set incsearch " Incremental search
set laststatus=2 " always display status line
@@ -54,15 +57,45 @@ set showmatch " Show matching brackets.
set showmode " Show in whih mode we are (insertion, etc)
set sidescrolloff=8 " Keep x line for scope while scrolling horizontally
set smartcase " Do smart case matching
+set tabpagemax=10 " Maximum number of tab pages to be opened from the command line
set title " update title of the terminal
set ttymouse=xterm2 " fix mouse when using screen
set wildmenu " allow tab completion in command line
+set winminheight=0 " minimal window height
+set winminwidth=0 " minimal window width
" }
syntax on " Syntax highlighting
-" Mapping {
-" Changing leader
-let mapleader = ","
-let g:mapleader = ","
+
+" ???
+":command! -nargs=* Enfr new | setlocal buftype=nofile bufhidden=hide noswapfile | r !enfr <args>
+
+" For Ack plugin
+let g:ackprg="ack-grep -H --nocolor --nogroup --column"
+
+" Key mapping {
+ " Changing leader
+ let mapleader = ","
+ let g:mapleader = ","
+
+ " window navigation
+ :nmap <C-Up> :wincmd k<CR>
+ :nmap <C-Down> :wincmd j<CR>
+ :nmap <C-Left> :wincmd h<CR>
+ :nmap <C-Right> :wincmd l<CR>
+ :imap <C-Up> <Esc>:wincmd k<CR>i
+ :imap <C-Down> <Esc>:wincmd j<CR>i
+ :imap <C-Left> <Esc>:wincmd h<CR>i
+ :imap <C-Right> <Esc>:wincmd l<CR>i
+
+ " tab navigation like firefox
+ :nmap <C-S-tab> :tabprevious<CR>
+ :nmap <C-tab> :tabnext<CR>
+ :map <C-S-tab> :tabprevious<CR>
+ :map <C-tab> :tabnext<CR>
+ :imap <C-S-tab> <Esc>:tabprevious<CR>i
+ :imap <C-tab> <Esc>:tabnext<CR>i
+ :nmap <C-t> :tabnew<CR>
+ :imap <C-t> <Esc>:tabnew<CR>
" }
" Folding {
set foldenable " enable folding
@@ -94,6 +127,7 @@ let g:mapleader = ","
" Fuzzy Finder {
nnoremap <silent> <leader>t :FufTag<CR>
nnoremap <silent> <leader>b :FufBuffer<CR>
+ nnoremap <silent> <leader>B :FufBookmarkFile<CR>
nnoremap <silent> <leader>l :FufLine<CR>
nnoremap <silent> <leader>r :FufFileWithCurrentBufferDir<CR>
nnoremap <silent> <leader>f :FufFile **/<CR>
@@ -103,7 +137,7 @@ let g:mapleader = ","
nnoremap <silent> <leader>db :FufDirWithCurrentBufferDir<CR>
nnoremap <silent> <leader>m :FufMruFile<CR>
nnoremap <silent> <leader>u :FufMruCmd<CR>
- " let g:fuf_modesDisable = []
+ let g:fuf_modesDisable = ['mrucmd']
" }
" NERD Tree {
nnoremap <silent> <leader>n :NERDTreeToggle<CR>
@@ -116,6 +150,10 @@ let g:mapleader = ","
" TagList {
nnoremap <silent> <leader>T :TlistToggle<CR>
" }
+ " TagBar {
+ let g:tagbar_left=1
+ nnoremap <silent> <leader>T :TagbarToggle<CR>
+ " }
" VimGuessLang {
" https://github.com/arenevier/vimguesslang
let g:spell_method='hunspell'
@@ -141,8 +179,16 @@ if &term =~ "screen"
let &t_SI = "\033P\033]12;red\007\033\\"
:silent !echo -ne "\033P\033]12;white\007\033\\"
autocmd VimLeave * :silent :!echo -ne "\033P\033]12;white\007\033\\"
+ set term=xterm
endif
-" }
+
+" Correct my favorites misspelling
+iabbrev lenght length
+iabbrev instanceOf instanceof
+iabbrev taht that
+iabbrev ParseInt parseInt
+iabbrev «» «&nbsp;&nbsp<left><left><left><left><left><left><left>
+
" Security {
" Keep at the end !
set exrc " allow to read .vimrc in current directory
Please sign in to comment.
Something went wrong with that request. Please try again.