diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index b081fd8..9c1bb03 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -18,9 +18,19 @@ " :GitStatus & :gitstatus | (C) -> shows the output of git status " :GitCommit & :gitcommit | (C) -> commits changes to the current file " :git | (C) -> open a vert split with the file in diff mode +" +" :vs33 | (C) -> create a vertical split using 33% width +" :vs66 | (C) -> create a vertical split using 66% width +" :sp33 | (C) -> create a split using 33% of the height +" :sp66 | (C) -> create a split using 66% of the height +" :diff | (C) -> open a new file in diff mode +" " :wsudo & :sudow | (C) -> write the file as root using sudo " :esudo & :sudoe | (C) -> read a file as root using sudo " +" :ik | (C) -> add following character to keywords +" :iK | (C) -> remove following character from keywords +" " Reference: (view plugin documentation for the full list of commands each offers) " | (A) -> comment selection/create an empty comment " b | (A) -> comment the current block(s) @@ -87,6 +97,9 @@ " # | (N) -> center vertically on nth last search term " " (toggles and features) +" ik | (N) -> add cursor character as a keyword +" iK | (N) -> remove cursor character as a keyword +" " ~ | (N) -> popup a command reference " , | (N) -> display tag information in echo area " | (N) -> toggle the vim reference manual @@ -319,6 +332,7 @@ "}}} "ALIASES: COMMAND SHORTCUTS {{{ + "shortcuts to git commands cabbrev GitLog ':Extradite:wincmd x:wincmd j:resize 10' cabbrev gitlog ':Extradite:wincmd x:wincmd j:resize 10' cabbrev GitDiff ':Gdiff' @@ -327,15 +341,23 @@ cabbrev gitstatus ':Gstatus' cabbrev GitCommit ':Gcommit' cabbrev gitcommit ':Gcommit' + + "create various sizes of splits cabbrev vs33 ':VS33' cabbrev vs66 ':VS66' cabbrev sp33 ':SP33' cabbrev sp66 ':SP66' cabbrev diff vertical diffsplit + + "read/write file with sudo cabbrev sudow SudoWrite cabbrev wsudo SudoWrite cabbrev sudoe SudoRead cabbrev esudo SudoRead + + "add/remove character as keyword + cabbrev ik setlocal iskeyword+= + cabbrev iK setlocal iskeyword-= "}}} "MAPPINGS: GENERAL KEYBINDINGS AND REBINDINGS {{{ @@ -435,6 +457,10 @@ "} "TOGGLES AND FEATURES:{ + "add/remove cursor character as a keyword + nmap k ':execute "setlocal iskeyword+=".getline(".")[col(".")-1]:echo "The character ".getline(".")[col(".")-1]." has been added to iskeyword"' + nmap K ':execute "setlocal iskeyword-=".getline(".")[col(".")-1]:echo "The character ".getline(".")[col(".")-1]." has been removed from iskeyword"' + "toggle the command reference box nnoremap ~ ':TCommand'