]> gitweb.fluxo.info Git - rhatto/dotfiles/vim.git/commitdiff
Autocd and commit shortcut
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 19 Jan 2019 12:04:41 +0000 (10:04 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 19 Jan 2019 12:04:41 +0000 (10:04 -0200)
vimrc.dot.link

index fae27ebef53dfc0b8062c4a141ad18d7a888da92..f09bcb7d34a2095b64e45806fa151435d7fc7dec 100644 (file)
@@ -25,6 +25,10 @@ set title
 set titleold="terminal"
 set titlestring=vim:\ %F
 
+" See http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file
+"set autochdir
+autocmd BufEnter * silent! lcd %:p:h
+
 " Thanks to http://stackoverflow.com/questions/1673649/vimrc-action-onclose
 function! ResetTitle(title)
     " disable vim's ability to set the title
@@ -171,6 +175,7 @@ nmap <ESC>s :OpenSession
 " We're closing the buffer instead of just the window to avoid slowness due to too many opened buffers
 nmap <ESC>m :bd<CR>
 nmap <ESC>w :w<CR>
+nmap <ESC>u :!up<CR>
 imap <ESC>n <ESC>:tabnew<CR>
 imap <ESC>t <ESC>:NERDTree 
 imap <ESC>t <ESC>:T 
@@ -197,6 +202,7 @@ imap <ESC>w <ESC>:w<CR>
 "nmap \es :OpenSession 
 "map \em :q!<CR>
 "map \ew :w<CR>
+"map \eu :!up<CR>
 "imap \en <ESC>:tabnew<CR>
 "imap \et <ESC>:OpenNERDTree<CR>
 "imap \eq <ESC>:wqa<CR>