aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2019-01-19 10:04:41 -0200
committerSilvio Rhatto <rhatto@riseup.net>2019-01-19 10:04:41 -0200
commit2d9cf9b91aa63b269dd131e0e663e58a6debdf0d (patch)
treed05572c071ed35b64f84155e41dbc9bafe9f5ee7
parentd48fcfa0bded91ce386b1f17bc6f76c9b8ef9243 (diff)
downloadvim-2d9cf9b91aa63b269dd131e0e663e58a6debdf0d.tar.gz
vim-2d9cf9b91aa63b269dd131e0e663e58a6debdf0d.tar.bz2
Autocd and commit shortcut
-rw-r--r--vimrc.dot.link6
1 files changed, 6 insertions, 0 deletions
diff --git a/vimrc.dot.link b/vimrc.dot.link
index fae27eb..f09bcb7 100644
--- a/vimrc.dot.link
+++ b/vimrc.dot.link
@@ -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 s :OpenSession
"map m :q!<CR>
"map w :w<CR>
+"map u :!up<CR>
"imap n <ESC>:tabnew<CR>
"imap t <ESC>:OpenNERDTree<CR>
"imap q <ESC>:wqa<CR>