diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index ac26cfc..d3613f1 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -136,7 +136,8 @@ " | (N) -> unindent the current line " " (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 " | (N) -> move to the beginning of the document " | (N) -> move to the end of the document " | (N) -> move to the end of the line @@ -526,6 +527,7 @@ "MOVEMENT:{ "additional mappings for easier access nnoremap = + + nnoremap _ - "remap keys for speedier movement nnoremap 4k @@ -568,8 +570,8 @@ "ctrl-a to select all (and an alt for screen users) nnoremap gg0vG$ xnoremap gg0vG$ - nnoremap a gg0vG$ - xnoremap a gg0vG$ + nnoremap a gg0vG$ + xnoremap a gg0vG$ "map remap keys for speedier text selection xnoremap 4k diff --git a/vim/config/vimpager.vim b/vim/config/vimpager.vim new file mode 100644 index 0000000..5cfe98f --- /dev/null +++ b/vim/config/vimpager.vim @@ -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 +unmap +unmap +unmap + +" 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 +map +map +map +noremap 4zl +noremap 4zh +noremap zl +noremap zh + +" Movement +noremap 0 +noremap +noremap $ +noremap +noremap +noremap +noremap = + +noremap _ - +noremap 4k +noremap 4j +noremap +noremap +noremap gg0 +noremap G$ +noremap $ +noremap ^ + +" Copy/Paste +nnoremap y vy +vnoremap y ':yank' +nnoremap y +vnoremap y +nnoremap T vg_y +vnoremap T g_y + +" Selection +nnoremap gg0vG$ +xnoremap gg0vG$ +nnoremap a gg0vG$ +xnoremap a gg0vG$ +nnoremap / ':noh' diff --git a/vimpagerrc b/vimpagerrc index a36671b..431a0f8 100644 --- a/vimpagerrc +++ b/vimpagerrc @@ -24,7 +24,8 @@ endif "}}} -"LOAD DARKCLOUD CONFIG AND THEME FILES: (relevant to vimpager) {{{ + +"DARKCLOUD CONFIG AND THEME FILES FOR VIMPAGER: {{{ "Add Config Directory: (distro-agnostic system-wide) let &runtimepath=printf('%s,%s/vim,%s/vim/after',&runtimepath,g:darkcloudpath,g:darkcloudpath) @@ -40,84 +41,9 @@ "Load Plugins: execute pathogen#infect('bundle.pager/{}') + "Vimpager Settings: + runtime config/vimpager.vim + "Load After Config: 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 - map - map - map - nnoremap 4zl - xnoremap 4zl - nnoremap 4zh - xnoremap 4zh - nnoremap zl - xnoremap zl - nnoremap zh - xnoremap zh - - "movement - map 0 - map $ - nnoremap = + - nnoremap 4k - nnoremap 4j - nnoremap - nnoremap - nnoremap gg0 - nnoremap G$ - nnoremap $ - nnoremap ^ - vmap MoveBlockUp - vmap MoveBlockDown - nmap MoveLineUp - nmap MoveLineDown - vmap MoveBlockHalfPageUp - vmap MoveBlockHalfPageDown - nmap MoveLineHalfPageUp - nmap MoveLineHalfPageDown - vmap MoveBlockHalfPageUp - vmap MoveBlockHalfPageDown - nmap MoveLineHalfPageUp - nmap MoveLineHalfPageDown - - "copy/paste - noremap y vy - nnoremap y - vnoremap y - nnoremap T vg_y - vnoremap T g_y - - "selection - nnoremap gg0vG$ - xnoremap gg0vG$ - nnoremap a gg0vG$ - xnoremap a gg0vG$ - xnoremap 4k - xnoremap 4j - xnoremap - xnoremap - xnoremap gg0 - xnoremap G$ - xnoremap $ - xnoremap ^ - nnoremap / ':noh:echo "Search results have been cleared"' - - "folds - nnoremap za - nnoremap 'zn:echo "all folds have been opened"' - nnoremap = 'zn:echo "all folds have been opened"' - nnoremap + 'zn:echo "all folds have been opened"' - nnoremap 'zN:echo "all opened folds have been closed"' - nnoremap - 'zN:echo "all opened folds have been closed"' - nnoremap _ 'zN:echo "all opened folds have been closed"' - nnoremap 0 'zX:echo "all folds have been reset"' - "}}} "}}}