mirror of
https://github.com/amix/vimrc
synced 2025-07-08 18:04:59 +08:00
Pulling upstream.
This commit is contained in:
@ -72,6 +72,12 @@ command W w !sudo tee % > /dev/null
|
||||
" Set 7 lines to the cursor - when moving vertically using j/k
|
||||
set so=7
|
||||
|
||||
" Avoid garbled characters in Chinese language windows OS
|
||||
let $LANG='en'
|
||||
set langmenu=en
|
||||
source $VIMRUNTIME/delmenu.vim
|
||||
source $VIMRUNTIME/menu.vim
|
||||
|
||||
" Turn on the WiLd menu
|
||||
set wildmenu
|
||||
|
||||
@ -96,6 +102,11 @@ set hid
|
||||
set backspace=eol,start,indent
|
||||
set whichwrap+=<,>,h,l
|
||||
|
||||
" In many terminal emulators the mouse works just fine, thus enable it.
|
||||
if has('mouse')
|
||||
set mouse=a
|
||||
endif
|
||||
|
||||
" Ignore case when searching
|
||||
set ignorecase
|
||||
|
||||
@ -230,6 +241,12 @@ map <leader>tc :tabclose<cr>
|
||||
map <leader>tm :tabmove
|
||||
map <leader>t<leader> :tabnext
|
||||
|
||||
" Let 'tl' toggle between this and the last accessed tab
|
||||
let g:lasttab = 1
|
||||
nmap <Leader>tl :exe "tabn ".g:lasttab<CR>
|
||||
au TabLeave * let g:lasttab = tabpagenr()
|
||||
|
||||
|
||||
" Opens a new tab with the current buffer's path
|
||||
" Super useful when editing files in the same directory
|
||||
map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/
|
||||
@ -352,6 +369,7 @@ map <leader>pp :setlocal paste!<cr>
|
||||
|
||||
|
||||
|
||||
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" => Helper functions
|
||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
Reference in New Issue
Block a user