More imports from old configuration

This commit is contained in:
Emmanuel BENOîT 2015-03-02 18:20:55 +01:00
parent d6f121f28f
commit aa04692c7d
6 changed files with 45 additions and 1 deletions

3
cfg/00-silent.vim Normal file
View file

@ -0,0 +1,3 @@
" 'Silent' command, can be used to run stuff silently then redrawing
command! -nargs=* -bang Silent execute ':silent<bang>'.' '.<q-args> | execute ':redraw!'

View file

@ -1,2 +1,6 @@
set autoindent " Basic automatic indentation
set formatoptions+=j " Merge comments when joining lines
" Reselect after visual mode indentation
vnoremap < <gv
vnoremap > >gv

View file

@ -11,4 +11,6 @@ function! <SID>ToggleMouse()
endfunction
set mouse=a
nnoremap <silent> <Leader>M :call <SID>ToggleMouse()<cr>
vnoremap <silent> <C-c> "+y

14
cfg/05-cursor.vim Normal file
View file

@ -0,0 +1,14 @@
" Cursor line & column: ' c' = invert, ' C' = mode, ' n' = line numbers
function! <SID>ToggleCursorMode()
if &cursorline && &cursorcolumn || !( &cursorline || &cursorcolumn )
set cursorline nocursorcolumn
else
set cursorline cursorcolumn
endif
endfunction
nnoremap <silent> <Leader>c :set cursorline! cursorcolumn!<CR>
nnoremap <silent> <Leader>C :call <SID>ToggleCursorMode()<CR>
nnoremap <silent> <Leader>n :set number!<CR>
set cursorline number

7
cfg/05-tabs.vim Normal file
View file

@ -0,0 +1,7 @@
" Keys to control (actual) tabs
nnoremap <silent> <A-Insert> :tabnew<CR>
nnoremap <silent> <C-A-Insert> :tabclose<CR>
nnoremap <silent> <A-Left> :tabprevious<CR>
nnoremap <silent> <A-Right> :tabnext<CR>
nnoremap <silent> <A-Up> :execute 'silent! tabmove ' . (tabpagenr()-2)<CR>
nnoremap <silent> <A-Down> :execute 'silent! tabmove ' . tabpagenr()<CR>