More imports from old configuration
This commit is contained in:
parent
d6f121f28f
commit
aa04692c7d
6 changed files with 45 additions and 1 deletions
3
cfg/00-silent.vim
Normal file
3
cfg/00-silent.vim
Normal 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!'
|
|
@ -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
|
||||
|
|
|
@ -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
14
cfg/05-cursor.vim
Normal 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
7
cfg/05-tabs.vim
Normal 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>
|
|
@ -10,6 +10,20 @@ local leader key.
|
|||
|
||||
+ Toggle folds
|
||||
|
||||
<Leader><Space> Clear highlighted search
|
||||
<Leader>M Toggle mouse
|
||||
<C-c> (Visual mode) Copy selected text to X clipboard
|
||||
|
||||
<Leader><Space> Clear highlighted search
|
||||
|
||||
<Leader>n Toggle line numbers
|
||||
<Leader>c Invert cursor line/column
|
||||
<Leader>C Toggle cursor line/column modes
|
||||
|
||||
<Leader>T Toggle visible tabs
|
||||
|
||||
<A-Insert> Open new tab
|
||||
<C-A-Insert> Close current tab
|
||||
<A-Left> Select previous tab
|
||||
<A-Right> Select next tab
|
||||
<A-Up> Move current tab left
|
||||
<A-Down> Move current tab right
|
||||
|
|
Loading…
Reference in a new issue