ソースを参照

~/.vimrc: Save and automatically restore sessions.

Stored in .project.vim for each project and with bindings `\ps` and
`\pl`. I like it! :)

Note the use of `:mksession!` (with `!`) and *not* using `<cr>` at the
end of the commands. This makes accidently overwriting previous
(precious) sessions less common.
Lucas Stadler 13 年 前
コミット
58f39732d3
共有1 個のファイルを変更した7 個の追加0 個の削除を含む
  1. 7 0
      .vimrc

+ 7 - 0
.vimrc

131
"noremap k j
131
"noremap k j
132
map q :quit<CR>
132
map q :quit<CR>
133
map Q :quitall<CR>
133
map Q :quitall<CR>
134
" save a 'project'
135
map <leader>ps :mksession! .project.vim
136
map <leader>pl :source .project.vim
134
" fancy maps
137
" fancy maps
135
map <Space> :NERDTree<CR>
138
map <Space> :NERDTree<CR>
136
map <c-b> :make<CR> " build
139
map <c-b> :make<CR> " build
192
if getcwd() != $HOME && filereadable('.vimrc')
195
if getcwd() != $HOME && filereadable('.vimrc')
193
	source .vimrc
196
	source .vimrc
194
endif
197
endif
198
199
if filereadable('.project.vim') && expand("%p") != ".git/COMMIT_EDITMSG"
200
	silent source .project.vim
201
endif