comparison vimrc @ 32:2da8d8daa033

Add remaps to vim and aliases to zsh
author zegervdv <zegervdv@me.com>
date Fri, 04 Apr 2014 18:12:59 +0200
parents 599325301323
children 3bc2e4f5cc59
comparison
equal deleted inserted replaced
31:faf7781dae42 32:2da8d8daa033
38 set autowrite 38 set autowrite
39 set hidden 39 set hidden
40 set hlsearch 40 set hlsearch
41 set incsearch 41 set incsearch
42 set ignorecase 42 set ignorecase
43 set gdefault
43 set smartcase 44 set smartcase
44 set smartindent 45 set smartindent
45 set autoindent 46 set autoindent
46 set scrolloff=4 47 set scrolloff=4
47 set textwidth=80 48 set textwidth=80
71 filetype plugin indent on 72 filetype plugin indent on
72 autocmd FileType ruby set tabstop=2|set shiftwidth=2 73 autocmd FileType ruby set tabstop=2|set shiftwidth=2
73 74
74 set clipboard=unnamed 75 set clipboard=unnamed
75 76
77 set undofile
76 set viminfo='10,\"100,:20,%,n~/.viminfo 78 set viminfo='10,\"100,:20,%,n~/.viminfo
79
80 " set list
81 " set listchars=tab:▸\ ,eol:¬
77 " }}} 82 " }}}
78 " Custom remaps and tricks {{{ 83 " Custom remaps and tricks {{{
79 " When editing a file, always jump to the last known cursor position. 84 " When editing a file, always jump to the last known cursor position.
80 " Don't do it for commit messages, when the position is invalid, or when 85 " Don't do it for commit messages, when the position is invalid, or when
81 " inside an event handler (happens when dropping a file on gvim). 86 " inside an event handler (happens when dropping a file on gvim).
104 109
105 " Very Magic search patterns 110 " Very Magic search patterns
106 nmap / /\v 111 nmap / /\v
107 cmap s/ s/\v 112 cmap s/ s/\v
108 113
109
110 inoremap £ \ 114 inoremap £ \
111 115
112 " nnoremap <SPACE> <C-e> 116 nnoremap <TAB> %
113 117 vnoremap <TAB> %
118
119 " Move between windows
120 nnoremap <C-l> <C-w><C-l>
121 nnoremap <C-h> <C-w><C-h>
122 nnoremap <C-j> <C-w><C-j>
123 nnoremap <C-k> <C-w><C-k>
114 124
115 nnoremap <silent> n n:call HLNext(0.4)<cr> 125 nnoremap <silent> n n:call HLNext(0.4)<cr>
116 nnoremap <silent> N N:call HLNext(0.4)<cr> 126 nnoremap <silent> N N:call HLNext(0.4)<cr>
117 127
118 function! HLNext (blinktime) 128 function! HLNext (blinktime)
153 let g:indent_guides_auto_colors = 0 163 let g:indent_guides_auto_colors = 0
154 let g:indent_guides_guide_size = 1 164 let g:indent_guides_guide_size = 1
155 highlight IndentGuidesEven guibg=background 165 highlight IndentGuidesEven guibg=background
156 highlight IndentGuidesOdd guibg='#282a2e' 166 highlight IndentGuidesOdd guibg='#282a2e'
157 167
158 " Show trailing whitespaces
159 " exec "set listchars=tab:\uBB\uBB,trail:\uB7,nbsp:~"
160 " set list
161
162 " }}} 168 " }}}
163 " Plugin Settings {{{ 169 " Plugin Settings {{{
164 " Vim Math plugin; make simple calculations 170 " Vim Math plugin; make simple calculations
165 vmap <expr> ++ VMATH_YankAndAnalyse() 171 vmap <expr> ++ VMATH_YankAndAnalyse()
166 nmap ++ vip++ 172 nmap ++ vip++
213 " ctrl p - Fuzzy file finder 219 " ctrl p - Fuzzy file finder
214 noremap <C-p> :CtrlP<CR> 220 noremap <C-p> :CtrlP<CR>
215 let g:ctrl_map = '<c-p>' 221 let g:ctrl_map = '<c-p>'
216 let g:ctrl_cmd = 'CtrlP' 222 let g:ctrl_cmd = 'CtrlP'
217 223
218 map <C-l> :CtrlPBuffer<CR> 224 map <C-m> :CtrlPBuffer<CR>
219 map <C-m> :CtrlPTag<CR> 225 " map <C-m> :CtrlPTag<CR>
220 226
221 if executable('ag') 227 if executable('ag')
222 let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""' 228 let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
223 let g:ctrlp_use_caching = 0 229 let g:ctrlp_use_caching = 0
224 endif 230 endif