Sfoglia il codice sorgente

~/.vimrc: be more friendly (and emacsy)

just trying for the emacsyness, though, C-f & friends don't work that
well.
Lucas Stadler 11 anni fa
parent
commit
b049eefca1
1 ha cambiato i file con 19 aggiunte e 3 eliminazioni
  1. 19 3
      .vimrc

+ 19 - 3
.vimrc

57
set nopaste
57
set nopaste
58
set pastetoggle=<F12>
58
set pastetoggle=<F12>
59
59
60
set mouse=a
61
60
set number " With numbertoggle they're quite cool (I think)
62
set number " With numbertoggle they're quite cool (I think)
61
63
62
" Copy indent of the last line.
64
" Copy indent of the last line.
116
noremap   <Down>   <NOP>
118
noremap   <Down>   <NOP>
117
noremap   <Left>   <NOP>
119
noremap   <Left>   <NOP>
118
noremap   <Right>  <NOP>
120
noremap   <Right>  <NOP>
121
" be a bit more like emacs
122
cnoremap <C-a>  <Home>
123
cnoremap <C-b>  <Left>
124
cnoremap <C-f>  <Right>
125
cnoremap <C-d>  <Delete>
126
cnoremap <M-b>  <S-Left>
127
cnoremap <M-f>  <S-Right>
128
cnoremap <M-d>  <S-right><Delete>
129
cnoremap <Esc>b <S-Left>
130
cnoremap <Esc>f <S-Right>
131
cnoremap <Esc>d <S-right><Delete>
132
cnoremap <C-g>  <C-c>
133
" navigate long lines easier
119
noremap   j        gj
134
noremap   j        gj
120
noremap   k        gk
135
noremap   k        gk
121
" Move easier between windows
136
" Move easier between windows
135
map <leader>pl :source .project.vim
150
map <leader>pl :source .project.vim
136
" fancy maps
151
" fancy maps
137
map <Space> :NERDTree<CR>
152
map <Space> :NERDTree<CR>
153
map <c-m> :!make<CR>
138
map <c-b> :make<CR> " build
154
map <c-b> :make<CR> " build
139
" Fuzzy finding (http://thechangelog.com/post/15573551543)
155
" Fuzzy finding (http://thechangelog.com/post/15573551543)
140
noremap <C-e> :CtrlP<CR>
156
"noremap <C-e> :CtrlP<CR>
141
"noremap <C-p> :tabnew<CR>:CtrlP<CR>
157
"noremap <C-p> :tabnew<CR>:CtrlP<CR>
142
map <c-f> :!ack
143
nmap <c-a> :w<CR>
158
"map <c-f> :!ack
159
"nmap <c-a> :w<CR>
144
map <Leader>t :TagbarToggle<CR>
160
map <Leader>t :TagbarToggle<CR>
145
161
146
""" Filetype specific stuff comes now...
162
""" Filetype specific stuff comes now...