mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-22 03:34:10 -05:00
Fixed some mapping bugs, pulled vimpager settings into its own config
file, and configured vimpager stuff more thoroughly against less.vim
This commit is contained in:
parent
9a85603d30
commit
7620aff01f
3 changed files with 82 additions and 82 deletions
|
@ -136,7 +136,8 @@
|
||||||
" <Shift-Tab> | (N) -> unindent the current line
|
" <Shift-Tab> | (N) -> unindent the current line
|
||||||
"
|
"
|
||||||
" (movement)
|
" (movement)
|
||||||
" = | (N) -> move to the first character on the next line
|
" = | (N) -> go to the first char on the next line
|
||||||
|
" _ | (N) -> go to the first char on the previous line
|
||||||
" <Shift-Up> | (N) -> move to the beginning of the document
|
" <Shift-Up> | (N) -> move to the beginning of the document
|
||||||
" <Shift-Down> | (N) -> move to the end of the document
|
" <Shift-Down> | (N) -> move to the end of the document
|
||||||
" <Shift-Right> | (N) -> move to the end of the line
|
" <Shift-Right> | (N) -> move to the end of the line
|
||||||
|
@ -526,6 +527,7 @@
|
||||||
"MOVEMENT:{
|
"MOVEMENT:{
|
||||||
"additional mappings for easier access
|
"additional mappings for easier access
|
||||||
nnoremap = +
|
nnoremap = +
|
||||||
|
nnoremap _ -
|
||||||
|
|
||||||
"remap keys for speedier movement
|
"remap keys for speedier movement
|
||||||
nnoremap <C-Up> 4k
|
nnoremap <C-Up> 4k
|
||||||
|
@ -568,8 +570,8 @@
|
||||||
"ctrl-a to select all (and an alt for screen users)
|
"ctrl-a to select all (and an alt for screen users)
|
||||||
nnoremap <C-a> gg0vG$
|
nnoremap <C-a> gg0vG$
|
||||||
xnoremap <C-a> <Esc>gg0vG$
|
xnoremap <C-a> <Esc>gg0vG$
|
||||||
nnoremap <Leader>a <Esc>gg0vG$
|
nnoremap <Leader>a gg0vG$
|
||||||
xnoremap <Leader>a gg0vG$
|
xnoremap <Leader>a <Esc>gg0vG$
|
||||||
|
|
||||||
"map remap keys for speedier text selection
|
"map remap keys for speedier text selection
|
||||||
xnoremap <C-Up> 4k
|
xnoremap <C-Up> 4k
|
||||||
|
|
72
vim/config/vimpager.vim
Normal file
72
vim/config/vimpager.vim
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
"============================================================"
|
||||||
|
" "
|
||||||
|
" Darkcloud Vim Config: vimpager.vim "
|
||||||
|
" "
|
||||||
|
" By: Kevin MacMartin (prurigro@gmail.com) "
|
||||||
|
" Website: https://github.com/prurigro/darkcloud-vimconfig "
|
||||||
|
" "
|
||||||
|
" License: MIT "
|
||||||
|
" "
|
||||||
|
"============================================================"
|
||||||
|
|
||||||
|
" Undo unwanted less.vim keymappings
|
||||||
|
unmap v
|
||||||
|
unmap w
|
||||||
|
unmap <PageDown>
|
||||||
|
unmap <kPageDown>
|
||||||
|
unmap <PageUp>
|
||||||
|
unmap <kPageUp>
|
||||||
|
|
||||||
|
" Main Settings:
|
||||||
|
set nocursorline nocursorcolumn "disable cursor column/line highlighting
|
||||||
|
set nofoldenable "disable the fold column
|
||||||
|
set noru laststatus=0 noshowmode "remove statusline
|
||||||
|
set clipboard=autoselect "autocopy selection
|
||||||
|
set clipboard+=unnamed "use '*' reg
|
||||||
|
if has('unnamedplus')|set clipboard+=unnamedplus|endif "if exists, use '+' reg
|
||||||
|
set autoread "track file changes
|
||||||
|
autocmd CursorHold * checktime "use CursorHold events to trigger checktime
|
||||||
|
|
||||||
|
" Mappings:
|
||||||
|
" Mouse
|
||||||
|
map <C-ScrollWheelUp> <Nop>
|
||||||
|
map <C-ScrollWheelDown> <Nop>
|
||||||
|
map <A-ScrollWheelUp> <Nop>
|
||||||
|
map <A-ScrollWheelDown> <Nop>
|
||||||
|
noremap <C-ScrollWheelUp> 4zl
|
||||||
|
noremap <C-ScrollWheelDown> 4zh
|
||||||
|
noremap <A-ScrollWheelUp> zl
|
||||||
|
noremap <A-ScrollWheelDown> zh
|
||||||
|
|
||||||
|
" Movement
|
||||||
|
noremap <Home> 0
|
||||||
|
noremap <kHome> <Home>
|
||||||
|
noremap <End> $
|
||||||
|
noremap <kEnd> <End>
|
||||||
|
noremap <Up> <C-P>
|
||||||
|
noremap <Down> <C-N>
|
||||||
|
noremap = +
|
||||||
|
noremap _ -
|
||||||
|
noremap <C-Up> 4k
|
||||||
|
noremap <C-Down> 4j
|
||||||
|
noremap <C-Right> <S-Right>
|
||||||
|
noremap <C-Left> <S-Left>
|
||||||
|
noremap <S-Up> gg0
|
||||||
|
noremap <S-Down> G$
|
||||||
|
noremap <S-Right> $
|
||||||
|
noremap <S-Left> ^
|
||||||
|
|
||||||
|
" Copy/Paste
|
||||||
|
nnoremap y vy<Esc>
|
||||||
|
vnoremap <silent><expr> y ':yank<CR>'
|
||||||
|
nnoremap <C-c> y
|
||||||
|
vnoremap <C-c> y
|
||||||
|
nnoremap T vg_y
|
||||||
|
vnoremap T g_y
|
||||||
|
|
||||||
|
" Selection
|
||||||
|
nnoremap <C-a> gg0vG$
|
||||||
|
xnoremap <C-a> <Esc>gg0vG$
|
||||||
|
nnoremap <Leader>a gg0vG$
|
||||||
|
xnoremap <Leader>a <Esc>gg0vG$
|
||||||
|
nnoremap <silent><expr> <Leader>/ ':noh<CR>'
|
84
vimpagerrc
84
vimpagerrc
|
@ -24,7 +24,8 @@
|
||||||
endif
|
endif
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
"LOAD DARKCLOUD CONFIG AND THEME FILES: (relevant to vimpager) {{{
|
|
||||||
|
"DARKCLOUD CONFIG AND THEME FILES FOR VIMPAGER: {{{
|
||||||
"Add Config Directory: (distro-agnostic system-wide)
|
"Add Config Directory: (distro-agnostic system-wide)
|
||||||
let &runtimepath=printf('%s,%s/vim,%s/vim/after',&runtimepath,g:darkcloudpath,g:darkcloudpath)
|
let &runtimepath=printf('%s,%s/vim,%s/vim/after',&runtimepath,g:darkcloudpath,g:darkcloudpath)
|
||||||
|
|
||||||
|
@ -40,84 +41,9 @@
|
||||||
"Load Plugins:
|
"Load Plugins:
|
||||||
execute pathogen#infect('bundle.pager/{}')
|
execute pathogen#infect('bundle.pager/{}')
|
||||||
|
|
||||||
|
"Vimpager Settings:
|
||||||
|
runtime config/vimpager.vim
|
||||||
|
|
||||||
"Load After Config:
|
"Load After Config:
|
||||||
runtime config/after.vim
|
runtime config/after.vim
|
||||||
|
|
||||||
"Tweak Settings:
|
|
||||||
set nocursorline nocursorcolumn "disable cursor column/line highlighting
|
|
||||||
set nofoldenable "disable the fold column
|
|
||||||
set noru laststatus=0 noshowmode "remove statusline
|
|
||||||
|
|
||||||
"Keymappings: {{{
|
|
||||||
"mouse
|
|
||||||
map <C-ScrollWheelUp> <Nop>
|
|
||||||
map <C-ScrollWheelDown> <Nop>
|
|
||||||
map <A-ScrollWheelUp> <Nop>
|
|
||||||
map <A-ScrollWheelDown> <Nop>
|
|
||||||
nnoremap <C-ScrollWheelUp> 4zl
|
|
||||||
xnoremap <C-ScrollWheelUp> 4zl
|
|
||||||
nnoremap <C-ScrollWheelDown> 4zh
|
|
||||||
xnoremap <C-ScrollWheelDown> 4zh
|
|
||||||
nnoremap <A-ScrollWheelUp> zl
|
|
||||||
xnoremap <A-ScrollWheelUp> zl
|
|
||||||
nnoremap <A-ScrollWheelDown> zh
|
|
||||||
xnoremap <A-ScrollWheelDown> zh
|
|
||||||
|
|
||||||
"movement
|
|
||||||
map <Home> 0
|
|
||||||
map <End> $
|
|
||||||
nnoremap = +
|
|
||||||
nnoremap <C-Up> 4k
|
|
||||||
nnoremap <C-Down> 4j
|
|
||||||
nnoremap <C-Right> <S-Right>
|
|
||||||
nnoremap <C-Left> <S-Left>
|
|
||||||
nnoremap <S-Up> gg0
|
|
||||||
nnoremap <S-Down> G$
|
|
||||||
nnoremap <S-Right> $
|
|
||||||
nnoremap <S-Left> ^
|
|
||||||
vmap <A-Up> <Plug>MoveBlockUp
|
|
||||||
vmap <A-Down> <Plug>MoveBlockDown
|
|
||||||
nmap <A-Up> <Plug>MoveLineUp
|
|
||||||
nmap <A-Down> <Plug>MoveLineDown
|
|
||||||
vmap <A-Left> <Plug>MoveBlockHalfPageUp
|
|
||||||
vmap <A-Right> <Plug>MoveBlockHalfPageDown
|
|
||||||
nmap <A-Left> <Plug>MoveLineHalfPageUp
|
|
||||||
nmap <A-Right> <Plug>MoveLineHalfPageDown
|
|
||||||
vmap <A-h> <Plug>MoveBlockHalfPageUp
|
|
||||||
vmap <A-l> <Plug>MoveBlockHalfPageDown
|
|
||||||
nmap <A-h> <Plug>MoveLineHalfPageUp
|
|
||||||
nmap <A-l> <Plug>MoveLineHalfPageDown
|
|
||||||
|
|
||||||
"copy/paste
|
|
||||||
noremap y vy<Esc>
|
|
||||||
nnoremap <C-c> y
|
|
||||||
vnoremap <C-c> y
|
|
||||||
nnoremap T vg_y
|
|
||||||
vnoremap T g_y
|
|
||||||
|
|
||||||
"selection
|
|
||||||
nnoremap <C-a> gg0vG$
|
|
||||||
xnoremap <C-a> <Esc>gg0vG$
|
|
||||||
nnoremap <Leader>a <Esc>gg0vG$
|
|
||||||
xnoremap <Leader>a gg0vG$
|
|
||||||
xnoremap <C-Up> 4k
|
|
||||||
xnoremap <C-Down> 4j
|
|
||||||
xnoremap <C-Right> <S-Right>
|
|
||||||
xnoremap <C-Left> <S-Left>
|
|
||||||
xnoremap <S-Up> gg0
|
|
||||||
xnoremap <S-Down> G$
|
|
||||||
xnoremap <S-Right> $
|
|
||||||
xnoremap <S-Left> ^
|
|
||||||
nnoremap <silent><expr> <Leader>/ ':noh<CR>:echo "Search results have been cleared"<CR>'
|
|
||||||
|
|
||||||
"folds
|
|
||||||
nnoremap <Space> za
|
|
||||||
nnoremap <silent><expr> <Leader><Space> 'zn:echo "all folds have been opened"<CR>'
|
|
||||||
nnoremap <silent><expr> <Leader>= 'zn:echo "all folds have been opened"<CR>'
|
|
||||||
nnoremap <silent><expr> <Leader>+ 'zn:echo "all folds have been opened"<CR>'
|
|
||||||
nnoremap <silent><expr> <Leader><Leader><Space> 'zN:echo "all opened folds have been closed"<CR>'
|
|
||||||
nnoremap <silent><expr> <Leader>- 'zN:echo "all opened folds have been closed"<CR>'
|
|
||||||
nnoremap <silent><expr> <Leader>_ 'zN:echo "all opened folds have been closed"<CR>'
|
|
||||||
nnoremap <silent><expr> <Leader>0 'zX:echo "all folds have been reset"<CR>'
|
|
||||||
"}}}
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
Loading…
Reference in a new issue