2014-04-09 08:07:12 -04:00
|
|
|
"============================================================"
|
|
|
|
" "
|
|
|
|
" Darkcloud Vim Config: keyboard settings "
|
|
|
|
" "
|
2014-06-17 01:49:46 -04:00
|
|
|
" By: Kevin MacMartin (prurigro@gmail.com) "
|
2014-04-09 08:07:12 -04:00
|
|
|
" Website: https://github.com/prurigro/darkcloud-vimconfig "
|
|
|
|
" "
|
|
|
|
" License: MIT "
|
|
|
|
" "
|
|
|
|
"============================================================"
|
2014-02-20 23:24:20 -05:00
|
|
|
"
|
2014-03-28 22:12:13 -04:00
|
|
|
" Note:
|
|
|
|
" *The default <Leader> key is: \
|
|
|
|
"
|
2014-04-09 13:04:34 -04:00
|
|
|
" Aliases:
|
2014-06-09 17:15:05 -04:00
|
|
|
" :GitLog & :gitlog | (C) -> show a navigatable log of commit history
|
|
|
|
" :GitDiff & :gitdiff | (C) -> current file and last commit in vimdiff
|
|
|
|
" :GitStatus & :gitstatus | (C) -> shows the output of git status
|
|
|
|
" :GitCommit & :gitcommit | (C) -> commits changes to the current file
|
|
|
|
" :wsudo & :sudow | (C) -> write the file as root using sudo
|
|
|
|
" :esudo & :sudoe | (C) -> read a file as root using sudo
|
2014-04-09 13:04:34 -04:00
|
|
|
"
|
2014-02-20 23:24:20 -05:00
|
|
|
" Reference: (view plugin documentation for the full list of commands each offers)
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
" (tcomment _ can also be -)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Ctrl-_><Ctrl-_> | (A) -> comment selection/create an empty comment
|
|
|
|
" gc | (A) -> comment selection/create an empty comment
|
|
|
|
" <Ctrl-_>b | (A) -> comment the current block(s)
|
|
|
|
" <Ctrl-_>r | (A) -> comment everything on the line to the right
|
|
|
|
" <Ctrl-_>p | (A) -> comment the current paragraph
|
|
|
|
" + | (V) -> increase the selected region
|
|
|
|
" _ | (V) -> decrease the selected region
|
|
|
|
" <Leader><Space> | (N) -> center content and hide everything else
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
"
|
|
|
|
" (surround)
|
2014-06-09 17:15:05 -04:00
|
|
|
" S" | (V) -> surround selection with quotes
|
|
|
|
" S<a href=""> | (V) -> surround <a href="">selection</a>
|
|
|
|
" ds" | (N) -> delete surrounding ""
|
|
|
|
" dst | (N) -> delete surrounding tag (ie: <strong></strong>)
|
|
|
|
" cs'" | (N) -> change surrounding '' to "" (any delimiters work)
|
|
|
|
" cs"<q> | (N) -> change surrounding "" to the tag: <q></q>
|
|
|
|
" cst" | (N) -> change any surrounding tag to ""
|
2014-06-13 00:58:13 -04:00
|
|
|
" ysiw' | (N) -> surround the current word with ''
|
|
|
|
" yss' | (N) -> surround non-whitespace of current line with ''
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
"
|
2014-02-20 23:24:20 -05:00
|
|
|
" Mappings:
|
2014-03-28 22:12:13 -04:00
|
|
|
" (mouse)
|
2014-06-12 19:18:16 -04:00
|
|
|
" <Ctrl-ScrollUp> | (A) -> scroll right quickly
|
|
|
|
" <Ctrl-ScrollDown> | (A) -> scroll left quickly
|
|
|
|
" <Alt-ScrollUp> | (A) -> scroll right slowly
|
|
|
|
" <Alt-ScrollDown> | (A) -> scroll left slowly
|
2014-04-14 08:08:26 -04:00
|
|
|
"
|
2014-06-12 19:18:16 -04:00
|
|
|
" <MiddleClick> | (A) -> selects from the cursor
|
|
|
|
" <Ctrl-LeftClick> | (A) -> selects from the cursor
|
|
|
|
" <Alt-LeftClick> | (A) -> select the line being clicked
|
|
|
|
" <Ctrl-Alt-LeftClick> | (A) -> select the paragraph being clicked
|
2014-04-11 11:45:29 -04:00
|
|
|
"
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Ctrl-RightClick> | (A) -> copy selection or character under the cursor
|
|
|
|
" <Ctrl-MiddleClick> | (A) -> copy selection or character under the cursor
|
2014-06-12 19:18:16 -04:00
|
|
|
"
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Alt-RightClick> | (A) -> cut selection or character under the cursor
|
|
|
|
" <Alt-MiddleClick> | (A) -> cut selection or character under the cursor
|
2014-06-12 19:18:16 -04:00
|
|
|
"
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Ctrl-Alt-RightClick> | (A) -> paste at the cursor (not mouse)
|
|
|
|
" <Ctrl-Alt-MiddleClick> | (A) -> paste at the cursor (not mouse)
|
2014-03-28 22:12:13 -04:00
|
|
|
"
|
2014-06-12 19:18:16 -04:00
|
|
|
" <Shift-MiddleClick> | (A) -> paste from xorg paste buffer
|
2014-04-11 11:45:29 -04:00
|
|
|
"
|
2014-03-28 22:12:13 -04:00
|
|
|
" (tabs)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Alt-n> | (N) -> go to the next open tab
|
|
|
|
" <Alt-p> | (N) -> go to the previous open tab
|
|
|
|
" <Alt-t> | (N) -> open a new tab
|
|
|
|
" <Alt-c> | (N) -> create a new tab with vimfiler
|
|
|
|
" <Alt-d> | (N) -> create a new tab with a double pane vimfiler
|
2014-03-28 22:12:13 -04:00
|
|
|
"
|
2014-06-13 00:58:13 -04:00
|
|
|
" (toggles and features)
|
2014-06-25 02:47:29 -04:00
|
|
|
" <Leader><F1> | (N) -> toggle the vim reference manual
|
2014-06-13 00:58:13 -04:00
|
|
|
" ` | (A) -> toggle the gutter(line numbers, folds and signify)
|
|
|
|
"
|
|
|
|
" Space | (N) -> toggle selected fold
|
|
|
|
" <Leader>+ | (N) -> open all folds
|
|
|
|
" <Leader>- | (N) -> unopen all folds
|
|
|
|
" <Leader>0 | (N) -> reset all folds using default fold level
|
|
|
|
"
|
2014-06-25 02:47:29 -04:00
|
|
|
" <F1> | (A) -> toggle vimfiler sidebar
|
|
|
|
" <F2> | (A) -> toggle the gundo sidebar
|
|
|
|
" <F3> | (A) -> toggle the tagbar sidebar
|
2014-06-17 08:19:40 -04:00
|
|
|
" <F4> | (A) -> toggle extradite git commit history
|
2014-06-13 00:58:13 -04:00
|
|
|
"
|
|
|
|
" <Ctrl-F1> | (A) -> toggle line wrapping
|
|
|
|
" <Ctrl-F2> | (A) -> toggle spell check
|
|
|
|
" <Ctrl-F3> | (A) -> toggle syntax checking
|
2014-06-17 08:19:40 -04:00
|
|
|
" <Ctrl-F4> | (A) -> toggle external-paste mode
|
2014-06-25 02:47:29 -04:00
|
|
|
" <Alt-F1> | (A) -> toggle line wrapping
|
|
|
|
" <Alt-F2> | (A) -> toggle spell check
|
|
|
|
" <Alt-F3> | (A) -> toggle syntax checking
|
|
|
|
" <Alt-F4> | (A) -> toggle external-paste mode
|
2014-03-28 22:12:13 -04:00
|
|
|
"
|
|
|
|
" (gvim toggles)
|
2014-07-07 16:07:14 -04:00
|
|
|
" <Leader><F1> | (A) -> toggle the menubar
|
|
|
|
" <Leader><F2> | (A) -> toggle the toolbar
|
2014-06-25 02:47:29 -04:00
|
|
|
"
|
|
|
|
" (spellcheck)
|
|
|
|
" ?<Space> | (N) -> toggle spellcheck error list
|
|
|
|
" ?+ | (N) -> add the selected word to the local dictionary
|
|
|
|
" ?? | (N) -> show spelling suggestions for selected word
|
|
|
|
" ?N | (N) -> go to the next spelling mistake
|
|
|
|
" ?P | (N) -> go to the previous spelling mistake
|
2014-03-28 22:12:13 -04:00
|
|
|
"
|
2014-04-02 11:17:12 -04:00
|
|
|
" (completion)
|
2014-06-23 05:05:08 -04:00
|
|
|
" <Ctrl-m>, | (A) -> enter after emmet 'word' (ie: html:5)
|
2014-06-26 13:31:13 -04:00
|
|
|
" <Enter> | (I) -> (neocomp) close the popup and <Enter>
|
|
|
|
" <Tab> | (I) -> (neocomp) select/cycle popup completion
|
|
|
|
" <Backspace> | (I) -> (neocomp) close the popup and <Backspace>
|
|
|
|
" <Ctrl-u> | (I) -> (neocomp) undo the most recent completion
|
2014-03-28 22:12:13 -04:00
|
|
|
"
|
2014-06-25 02:47:29 -04:00
|
|
|
" (search)
|
|
|
|
" <Leader>\ | (N) -> remove search highlighting
|
|
|
|
"
|
2014-03-28 22:12:13 -04:00
|
|
|
" (formatting)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Backspace> | (V) -> deletes currently selected text
|
2014-06-26 09:16:18 -04:00
|
|
|
" <Leader>J | (N) -> split the line into lines of <=79 chars
|
|
|
|
" <Leader>J | (V) -> split the selection into lines of <=79 chars
|
2014-06-25 02:47:29 -04:00
|
|
|
" <Leader>f | (N) -> format document and return to cursor
|
|
|
|
" <Leader>f | (V) -> format the selection and return to cursor
|
|
|
|
" <Leader>F | (N) -> format document using :Autoformat
|
|
|
|
" <Leader>w | (N) -> remove whitespace
|
|
|
|
" <Leader>t | (N) -> convert tabs into spaces
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Tab> | (V) -> indent all the lines currently selected
|
|
|
|
" <Tab> | (N) -> indent the current line
|
|
|
|
" <Shift-Tab> | (V) -> unindent all the lines currently selected
|
|
|
|
" <Shift-Tab> | (N) -> unindent the current line
|
2014-02-20 23:24:20 -05:00
|
|
|
"
|
2014-03-28 22:12:13 -04:00
|
|
|
" (movement)
|
2014-06-09 17:15:05 -04:00
|
|
|
" = | (N) -> move to the first character on the next line
|
2014-06-26 07:35:39 -04:00
|
|
|
" <Shift-Up> | (N) -> move to the beginning of the document
|
|
|
|
" <Shift-Down> | (N) -> move to the end of the document
|
|
|
|
" <Shift-Right> | (N) -> move to the end of the line
|
|
|
|
" <Shift-Left> | (N) -> move to the beginning of the non-whitespace
|
2014-06-09 17:15:05 -04:00
|
|
|
"
|
2014-06-26 07:35:39 -04:00
|
|
|
" <Ctrl-Up> | (N) -> move four lines up
|
|
|
|
" <Ctrl-Down> | (N) -> move four lines down
|
|
|
|
" <Ctrl-Right> | (N) -> move one word right
|
|
|
|
" <Ctrl-Left> | (N) -> move one word left
|
2014-06-09 17:15:05 -04:00
|
|
|
"
|
|
|
|
" <Alt+Up> | (V) -> move a block up one line
|
|
|
|
" <Alt+Down> | (V) -> move a block down one line
|
|
|
|
" <Alt+Up> | (N) -> move a line up one line
|
|
|
|
" <Alt+Down> | (N) -> move a line down one line
|
|
|
|
"
|
|
|
|
" <Alt+Left> | (V) -> move a block up a half page
|
|
|
|
" <Alt+Right> | (V) -> move a block down a half page
|
|
|
|
" <Alt+Left> | (N) -> move a line up a half page
|
|
|
|
" <Alt+Right> | (N) -> move a line down a half page
|
|
|
|
" <Alt+h> | (V) -> move a block up a half page
|
|
|
|
" <Alt+l> | (V) -> move a block down a half page
|
|
|
|
" <Alt+h> | (N) -> move a line up a half page
|
|
|
|
" <Alt+l> | (N) -> move a line down a half page
|
|
|
|
"
|
|
|
|
" >> | (N) -> next difference (vimdiff/signify)
|
|
|
|
" << | (N) -> previous difference (vimdiff/signify)
|
2014-04-07 10:04:48 -04:00
|
|
|
"
|
2014-03-28 22:12:13 -04:00
|
|
|
" (selection)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Ctrl-a> | (N) -> select all text
|
|
|
|
" <Leader>a | (N) -> select all text
|
|
|
|
" <Ctrl-a> | (V) -> select all text
|
|
|
|
" <Leader>a | (V) -> select all text
|
2014-04-03 06:17:16 -04:00
|
|
|
"
|
2014-06-26 07:35:39 -04:00
|
|
|
" <Shift-Up> | (V) -> select all text above
|
|
|
|
" <Shift-Down> | (V) -> select all text below
|
|
|
|
" <Shift-Right> | (V) -> select all text to the right
|
|
|
|
" <Shift-Left> | (V) -> select all text to the left up to the indent
|
2014-04-03 06:17:16 -04:00
|
|
|
"
|
2014-06-26 07:35:39 -04:00
|
|
|
" <Ctrl-Up> | (V) -> select four lines up
|
|
|
|
" <Ctrl-Down> | (V) -> select four lines down
|
|
|
|
" <Ctrl-Right> | (V) -> select one word right
|
|
|
|
" <Ctrl-Left> | (V) -> select one word left
|
2014-02-20 23:24:20 -05:00
|
|
|
"
|
2014-04-30 10:15:07 -04:00
|
|
|
" (copy/paste and undo/redo)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Leader>p | (N) -> view the paste buffers and register contents
|
|
|
|
" y | (N) -> copies the character at the cursor
|
|
|
|
" P | (V) -> save selection to the buffer and paste over
|
|
|
|
" p | (V) -> preserve the buffer pasting over selected text
|
|
|
|
" <Ctrl-p>Direction | (N) -> paste in the direction entered
|
2014-04-30 10:15:07 -04:00
|
|
|
"
|
|
|
|
" (delete/cut functions)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Leader>x | (N) -> delete the char(s) under and the cursor
|
|
|
|
" <Leader>x | (V) -> delete the currently selected text
|
|
|
|
" <Leader>X | (N) -> delete the char(s) before the cursor
|
|
|
|
" <Leader>X | (V) -> delete the currently selected lines
|
|
|
|
" <Leader>D | (N) -> delete chars under and after the cursor on the line
|
|
|
|
" <Leader>D | (V) -> delete the currently selected lines
|
|
|
|
" <Leader>dw | (N) -> delete chars under and after the cursor in the word
|
|
|
|
" <Leader>dd | (N) -> delete lines under and after the one below
|
|
|
|
" <Leader>d | (V) -> delete the currently selected text
|
2014-04-30 10:15:07 -04:00
|
|
|
"
|
2014-06-17 08:19:40 -04:00
|
|
|
" (improved copy and paste shortcuts)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Ctrl-v> | (N) -> paste from buffer
|
|
|
|
" <Ctrl-v> | (V) -> paste buffer in place of selection
|
|
|
|
" <Ctrl-v> | (I) -> paste from buffer then return to input
|
|
|
|
" <Ctrl-c> | (N) -> copy character
|
|
|
|
" <Ctrl-c> | (V) -> copy selection
|
|
|
|
" <Ctrl-x> | (N) -> cut character
|
|
|
|
" <Ctrl-x> | (V) -> cut selection
|
2014-04-30 10:15:07 -04:00
|
|
|
"
|
|
|
|
" (remap dangerous functions that skip undo)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Ctrl-u> | (I) -> undo-able equivalent
|
|
|
|
" <Ctrl-w> | (I) -> undo-able equivalent
|
2014-03-28 22:12:13 -04:00
|
|
|
"
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
" Filetype Specific Mappings:
|
2014-04-09 13:04:34 -04:00
|
|
|
" (extradite)
|
2014-06-17 08:19:40 -04:00
|
|
|
" <F4> | (A) -> close the dialog
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Right> | (A) -> same as down
|
|
|
|
" l | (A) -> same as j
|
|
|
|
" <Left> | (A) -> same as Up
|
|
|
|
" h | (A) -> same as k
|
2014-04-09 13:04:34 -04:00
|
|
|
"
|
|
|
|
" (gundo)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <LeftClick> | (A) -> same as normal + justify on the left
|
|
|
|
" <MiddleClick> | (A) -> same as the left mouse
|
|
|
|
" <RightClick> | (A) -> same as the left mouse
|
|
|
|
" <Right> | (A) -> same as down
|
|
|
|
" l | (A) -> same as j
|
|
|
|
" <Left> | (A) -> same as Up
|
|
|
|
" h | (A) -> same as k
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
"
|
2014-04-05 03:20:53 -04:00
|
|
|
" (help)
|
2014-06-09 17:15:05 -04:00
|
|
|
" q | (A) -> close the dialog
|
2014-06-25 02:47:29 -04:00
|
|
|
" <Leader><F1> | (A) -> close the dialog
|
2014-06-09 17:15:05 -04:00
|
|
|
" ?> | (A) -> close the dialog
|
|
|
|
" ?< | (A) -> close the dialog
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
"
|
2014-04-08 00:13:03 -04:00
|
|
|
" (markdown)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <F8> | (A) -> show heading TOC instead of the taglist
|
2014-04-08 00:13:03 -04:00
|
|
|
"
|
|
|
|
" (markdown toc)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <LClick> | (A) -> left click + left justify the cursor
|
|
|
|
" <MClick> | (A) -> same as the left click
|
|
|
|
" <RClick> | (A) -> same as the left click
|
|
|
|
" <LClick><LClick> | (A) -> select heading to edit
|
|
|
|
" <Space> | (A) -> select heading but remain in toc
|
|
|
|
" <Left> | (A) -> up
|
|
|
|
" <Right> | (A) -> down
|
|
|
|
" h | (A) -> j
|
|
|
|
" l | (A) -> k
|
2014-04-08 00:13:03 -04:00
|
|
|
"
|
2014-04-09 13:04:34 -04:00
|
|
|
" (vimdiff)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <Leader><> | (N) -> update differences
|
|
|
|
" <Leader>>< | (N) -> update differences
|
|
|
|
" <Leader>> | (N) -> replace diff in other pane with current pane
|
|
|
|
" <Leader<< | (N) -> replace diff in current pane with other pane
|
2014-04-07 02:40:35 -04:00
|
|
|
"
|
2014-04-09 13:04:34 -04:00
|
|
|
" (vimfiler)
|
2014-06-09 17:15:05 -04:00
|
|
|
" <LClick> | (A) -> left click + left justify the cursor
|
|
|
|
" <MClick> | (A) -> same as the left click
|
|
|
|
" <RClick> | (A) -> same as the left click
|
|
|
|
" <LClick><LClick> | (A) -> edit selected file
|
|
|
|
" <Right> | (A) -> map to l, which opens a directory
|
|
|
|
" <Left> | (A) -> map to h, which goes up one directory
|
|
|
|
" ' | (A) -> edit the selected file
|
|
|
|
" n | (A) -> start editing a new file
|
|
|
|
"
|
|
|
|
|
|
|
|
"DISABLED DEFAULT MAPPING: UNSET SHORTCUTS {{{
|
2014-06-13 00:58:13 -04:00
|
|
|
"-unmapping tabbing from < and > for use with diff
|
|
|
|
"+these commands are replaced by tab and shift+tab
|
2014-06-09 17:15:05 -04:00
|
|
|
noremap > <Nop>
|
|
|
|
noremap < <Nop>
|
2014-06-13 00:58:13 -04:00
|
|
|
|
|
|
|
"-unmapping help from F1 and Ctrl-F1 for use toggling the reference manual
|
2014-06-25 02:47:29 -04:00
|
|
|
"+the :h topic feature works, and <Leader><F1> displays quickref
|
2014-06-13 00:58:13 -04:00
|
|
|
map <F1> <Nop>
|
2014-06-25 02:47:29 -04:00
|
|
|
map <A-F1> <Nop>
|
2014-06-13 00:58:13 -04:00
|
|
|
map <C-F1> <Nop>
|
2014-06-09 17:15:05 -04:00
|
|
|
"}}}
|
2014-02-20 23:24:20 -05:00
|
|
|
|
2014-04-09 13:04:34 -04:00
|
|
|
"ALIASES: COMMAND SHORTCUTS {{{
|
|
|
|
cabbrev <expr><silent> GitLog ':Extradite<CR>:wincmd x<CR>:wincmd j<CR>:resize 10<CR>'
|
|
|
|
cabbrev <expr><silent> gitlog ':Extradite<CR>:wincmd x<CR>:wincmd j<CR>:resize 10<CR>'
|
2014-04-30 10:15:07 -04:00
|
|
|
cabbrev <expr><silent> GitDiff ':Gdiff<CR>'
|
|
|
|
cabbrev <expr><silent> gitdiff ':Gdiff<CR>'
|
|
|
|
cabbrev <expr><silent> GitStatus ':Gstatus<CR>'
|
|
|
|
cabbrev <expr><silent> gitstatus ':Gstatus<CR>'
|
|
|
|
cabbrev <expr><silent> GitCommit ':Gcommit<CR>'
|
|
|
|
cabbrev <expr><silent> gitcommit ':Gcommit<CR>'
|
|
|
|
|
2014-04-09 13:04:34 -04:00
|
|
|
cabbrev sudow SudoWrite
|
|
|
|
cabbrev wsudo SudoWrite
|
|
|
|
cabbrev sudoe SudoRead
|
|
|
|
cabbrev esudo SudoRead
|
|
|
|
"}}}
|
|
|
|
|
2014-03-11 03:05:09 -04:00
|
|
|
"MAPPINGS: GENERAL KEYBINDINGS AND REBINDINGS {{{
|
2014-04-03 23:00:34 -04:00
|
|
|
"MOUSE:{
|
2014-04-07 00:41:03 -04:00
|
|
|
"hold ctrl to scroll left/right instead of up/down
|
2014-06-12 19:18:16 -04:00
|
|
|
nnoremap <C-ScrollWheelUp> 4zl
|
|
|
|
xnoremap <C-ScrollWheelUp> 4zl
|
2014-04-07 00:41:03 -04:00
|
|
|
inoremap <C-ScrollWheelUp> <C-O>4zl
|
2014-06-12 19:18:16 -04:00
|
|
|
nnoremap <C-ScrollWheelDown> 4zh
|
|
|
|
xnoremap <C-ScrollWheelDown> 4zh
|
2014-04-07 00:41:03 -04:00
|
|
|
inoremap <C-ScrollWheelDown> <C-O>4zh
|
|
|
|
|
|
|
|
"hold alt to scroll left/right more precisely
|
2014-06-12 19:18:16 -04:00
|
|
|
nnoremap <A-ScrollWheelUp> zl
|
|
|
|
xnoremap <A-ScrollWheelUp> zl
|
2014-04-07 00:41:03 -04:00
|
|
|
inoremap <A-ScrollWheelUp> <C-O>zl
|
2014-06-12 19:18:16 -04:00
|
|
|
nnoremap <A-ScrollWheelDown> zh
|
|
|
|
xnoremap <A-ScrollWheelDown> zh
|
2014-04-07 00:41:03 -04:00
|
|
|
inoremap <A-ScrollWheelDown> <C-O>zh
|
2014-04-11 11:45:29 -04:00
|
|
|
|
2014-06-12 19:18:16 -04:00
|
|
|
"middle & ctrl+left = select from cursor
|
|
|
|
nnoremap <MiddleMouse> <RightMouse>
|
|
|
|
xnoremap <MiddleMouse> <RightMouse>
|
2014-06-16 01:52:53 -04:00
|
|
|
inoremap <MiddleMouse> <RightMouse>
|
2014-06-12 19:18:16 -04:00
|
|
|
nnoremap <C-LeftMouse> <RightMouse>
|
|
|
|
xnoremap <C-LeftMouse> <RightMouse>
|
2014-06-16 01:52:53 -04:00
|
|
|
inoremap <C-LeftMouse> <RightMouse>
|
2014-06-12 19:18:16 -04:00
|
|
|
|
|
|
|
"alt+left = line
|
|
|
|
nnoremap <A-LeftMouse> <LeftMouse>V
|
|
|
|
xnoremap <A-LeftMouse> <RightMouse>$
|
|
|
|
inoremap <A-LeftMouse> <Esc><LeftMouse>V
|
2014-04-11 11:45:29 -04:00
|
|
|
|
2014-06-12 19:18:16 -04:00
|
|
|
"ctrl+alt+left = select paragraph
|
|
|
|
nnoremap <C-A-LeftMouse> <LeftMouse>vip
|
|
|
|
xnoremap <C-A-LeftMouse> <RightMouse>ip$
|
|
|
|
inoremap <C-A-LeftMouse> <Esc><LeftMouse>vip
|
|
|
|
|
|
|
|
"ctrl+(middle/right) = copy
|
2014-04-18 05:12:35 -04:00
|
|
|
nnoremap <C-RightMouse> <LeftMouse>Vy
|
|
|
|
vnoremap <C-RightMouse> y
|
2014-06-12 19:18:16 -04:00
|
|
|
inoremap <C-RightMouse> <C-0>y
|
|
|
|
nnoremap <C-MiddleMouse> <LeftMouse>Vy
|
2014-04-18 05:12:35 -04:00
|
|
|
vnoremap <C-MiddleMouse> y
|
2014-06-12 19:18:16 -04:00
|
|
|
inoremap <C-MiddleMouse> <C-0>y
|
2014-04-18 05:12:35 -04:00
|
|
|
|
2014-06-12 19:18:16 -04:00
|
|
|
"alt+(middle/right) = cut
|
2014-04-18 05:12:35 -04:00
|
|
|
nnoremap <A-RightMouse> x
|
|
|
|
xnoremap <A-RightMouse> x
|
|
|
|
inoremap <A-RightMouse> <C-O>x
|
2014-06-12 19:18:16 -04:00
|
|
|
nnoremap <A-MiddleMouse> x
|
|
|
|
xnoremap <A-MiddleMouse> x
|
2014-04-18 05:12:35 -04:00
|
|
|
inoremap <A-MiddleMouse> <C-O>x
|
|
|
|
|
2014-06-12 19:18:16 -04:00
|
|
|
"ctrl+alt+(middle/right) = paste
|
2014-04-18 05:12:35 -04:00
|
|
|
nnoremap <C-A-RightMouse> p
|
|
|
|
xnoremap <C-A-RightMouse> p
|
|
|
|
inoremap <C-A-RightMouse> <C-O>p
|
2014-06-12 19:18:16 -04:00
|
|
|
nnoremap <C-A-MiddleMouse> p
|
|
|
|
xnoremap <C-A-MiddleMouse> p
|
2014-04-18 05:12:35 -04:00
|
|
|
inoremap <C-A-MiddleMouse> <C-O>p
|
|
|
|
|
2014-06-12 19:18:16 -04:00
|
|
|
"configure middle click to paste from X
|
|
|
|
noremap <S-Insert> <MiddleMouse>
|
|
|
|
noremap! <S-Insert> <MiddleMouse>
|
2014-04-03 23:00:34 -04:00
|
|
|
"}
|
|
|
|
|
|
|
|
"TABS:{
|
2014-06-03 22:07:16 -04:00
|
|
|
nnoremap <silent><expr> <A-n> ':tabnext<CR>'
|
|
|
|
nnoremap <silent><expr> <A-p> ':tabprev<CR>'
|
|
|
|
nnoremap <silent><expr> <A-t> ':tabnew<CR>'
|
2014-06-09 17:15:05 -04:00
|
|
|
nnoremap <silent><expr> <A-c> ':VimFiler -tab -project<CR>'
|
2014-06-03 22:07:16 -04:00
|
|
|
nnoremap <silent><expr> <A-d> ':VimFiler -tab -project -double<CR>'
|
2014-04-03 23:00:34 -04:00
|
|
|
"}
|
|
|
|
|
2014-06-13 00:58:13 -04:00
|
|
|
"TOGGLES AND FEATURES:{
|
|
|
|
"toggle the vim reference manual
|
2014-06-25 02:47:29 -04:00
|
|
|
nnoremap <silent><expr> <Leader><F1> ':h index.txt<CR>'
|
2014-04-07 00:41:03 -04:00
|
|
|
|
2014-06-13 00:58:13 -04:00
|
|
|
"toggle the display of the left gutter
|
2014-06-23 05:05:08 -04:00
|
|
|
nnoremap <silent><expr> ` ':if (&number)<Bar>set number!<Bar>if (&foldenable)<Bar>set foldenable!<Bar>endif<Bar>if exists("b:sy")<Bar>if (b:sy.active)<Bar>SignifyToggle<Bar>endif<Bar>endif<Bar>else<Bar>set number!<Bar>if !(&foldenable)<Bar>set foldenable!<Bar>endif<Bar>if exists("b:sy")<Bar>if !(b:sy.active)<Bar>SignifyToggle<Bar>endif<Bar>endif<Bar>endif<CR>:echo "gutter visibility toggled"<CR>'
|
2014-04-07 00:41:03 -04:00
|
|
|
|
|
|
|
"toggle folded code at foldpoints
|
|
|
|
nnoremap <Space> za
|
|
|
|
|
2014-06-13 00:58:13 -04:00
|
|
|
"open all folds
|
|
|
|
nnoremap <silent><expr> <Leader>+ 'zn:echo "all folds have been opened"<CR>'
|
2014-04-07 00:41:03 -04:00
|
|
|
|
2014-06-13 00:58:13 -04:00
|
|
|
"close folds set to be closed
|
|
|
|
nnoremap <silent><expr> <Leader>- 'zN:echo "all opened folds have been closed"<CR>'
|
2014-04-07 00:41:03 -04:00
|
|
|
|
2014-06-13 00:58:13 -04:00
|
|
|
"reset all folds to the default fold level
|
|
|
|
nnoremap <silent><expr> <Leader>0 'zX:echo "all folds have been reset"<CR>'
|
2014-04-07 00:41:03 -04:00
|
|
|
|
2014-06-25 02:47:29 -04:00
|
|
|
"trigger vimfiler
|
|
|
|
nnoremap <silent><expr> <F1> ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
|
|
|
|
xnoremap <silent><expr> <F1> '<Esc>:VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
|
|
|
|
inoremap <silent><expr> <F1> '<Esc>:VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
|
|
|
|
|
2014-06-13 00:58:13 -04:00
|
|
|
"bindings to trigger the gundo undo history
|
2014-06-25 02:47:29 -04:00
|
|
|
nnoremap <silent><expr> <F2> ':GundoToggle<CR>:echo "undo history sidebar toggled"<CR>'
|
|
|
|
xnoremap <silent><expr> <F2> '<Esc>:GundoToggle<CR>'
|
|
|
|
inoremap <silent><expr> <F2> '<Esc>:GundoToggle<CR>'
|
2014-04-07 12:05:52 -04:00
|
|
|
|
2014-04-07 00:41:03 -04:00
|
|
|
"bindings to trigger the tagbar list of tags
|
2014-06-25 02:47:29 -04:00
|
|
|
nnoremap <silent><expr> <F3> ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
|
|
|
|
xnoremap <silent><expr> <F3> '<Esc>:TagbarToggle<CR>gv'
|
|
|
|
inoremap <silent><expr> <F3> '<C-O>:TagbarToggle<CR>'
|
2014-04-07 00:41:03 -04:00
|
|
|
|
2014-06-13 00:58:13 -04:00
|
|
|
"view commit history and diffs
|
2014-06-17 08:19:40 -04:00
|
|
|
nnoremap <expr><silent> <F4> ':Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
|
|
|
xnoremap <expr><silent> <F4> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
|
|
|
inoremap <expr><silent> <F4> '<Esc>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
2014-04-07 00:41:03 -04:00
|
|
|
|
2014-06-13 00:58:13 -04:00
|
|
|
"toggle line wrapping (and bottom bar if using the gui)
|
|
|
|
nnoremap <silent><expr> <C-F1> ':set wrap!<CR>:echo "line wrapping toggled"<CR>'
|
|
|
|
xnoremap <silent><expr> <C-F1> '<Esc>:set wrap!<CR>gv'
|
|
|
|
inoremap <silent><expr> <C-F1> '<C-O>:set wrap!<CR>'
|
2014-06-25 02:47:29 -04:00
|
|
|
nnoremap <silent><expr> <A-F1> ':set wrap!<CR>:echo "line wrapping toggled"<CR>'
|
|
|
|
xnoremap <silent><expr> <A-F1> '<Esc>:set wrap!<CR>gv'
|
|
|
|
inoremap <silent><expr> <A-F1> '<C-O>:set wrap!<CR>'
|
2014-06-17 08:19:40 -04:00
|
|
|
|
2014-06-13 00:58:13 -04:00
|
|
|
"toggle spellcheck
|
2014-06-25 02:47:29 -04:00
|
|
|
nnoremap <silent><expr> <C-F2> ':set spell!<CR>:echo "spell checking toggled"<CR>'
|
|
|
|
xnoremap <silent><expr> <C-F2> '<Esc>:set spell!<CR>gv'
|
|
|
|
inoremap <silent><expr> <C-F2> '<C-O>:set spell!<CR>'
|
|
|
|
nnoremap <silent><expr> <A-F2> ':set spell!<CR>:echo "spell checking toggled"<CR>'
|
|
|
|
xnoremap <silent><expr> <A-F2> '<Esc>:set spell!<CR>gv'
|
|
|
|
inoremap <silent><expr> <A-F2> '<C-O>:set spell!<CR>'
|
|
|
|
|
|
|
|
"toggle syntax checking
|
|
|
|
nnoremap <silent><expr> <C-F3> ':SyntasticToggleMode<CR>'
|
|
|
|
xnoremap <silent><expr> <C-F3> '<Esc>:SyntasticToggleMode<CR>gv'
|
|
|
|
inoremap <silent><expr> <C-F3> '<C-O>:SyntasticToggleMode<CR>'
|
|
|
|
nnoremap <silent><expr> <A-F3> ':SyntasticToggleMode<CR>'
|
|
|
|
xnoremap <silent><expr> <A-F3> '<Esc>:SyntasticToggleMode<CR>gv'
|
|
|
|
inoremap <silent><expr> <A-F3> '<C-O>:SyntasticToggleMode<CR>'
|
2014-06-13 00:58:13 -04:00
|
|
|
|
2014-06-17 08:19:40 -04:00
|
|
|
"toggle external-paste mode
|
|
|
|
set pastetoggle=<C-F4>
|
2014-06-25 02:47:29 -04:00
|
|
|
noremap <A-F4> <C-F4>
|
2014-04-03 23:00:34 -04:00
|
|
|
"}
|
|
|
|
|
|
|
|
"GVIM TOGGLES:{
|
2014-06-25 02:47:29 -04:00
|
|
|
"toggle the menu
|
2014-07-07 16:07:14 -04:00
|
|
|
nnoremap <silent><expr> <Leader><F1> ":if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>:echo 'Menu bar toggled'<CR>"
|
|
|
|
vnoremap <silent><expr> <Leader><F1> "<Esc>:if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>gv"
|
|
|
|
inoremap <silent><expr> <Leader><F1> "<C-O>:if &go=~#'m'<Bar>set go-=m<Bar>else<Bar>set go+=m<Bar>endif<CR>"
|
2014-06-25 02:47:29 -04:00
|
|
|
|
|
|
|
"toggle the toolbar
|
2014-07-07 16:07:14 -04:00
|
|
|
nnoremap <silent><expr> <Leader><F2> ":if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>:echo 'Toolbar toggled'<CR>"
|
|
|
|
vnoremap <silent><expr> <Leader><F2> "<Esc>:if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>gv"
|
|
|
|
inoremap <silent><expr> <Leader><F2> "<C-O>:if &go=~#'T'<Bar>set go-=T<Bar>else<Bar>set go+=T<Bar>endif<CR>"
|
2014-06-25 02:47:29 -04:00
|
|
|
"}
|
|
|
|
|
|
|
|
"SPELLCHECK:{
|
|
|
|
"trigger spellcheck bar
|
|
|
|
nnoremap <silent><expr> ?<Space> ':UpdateAndSpellCheck<CR>:call ToggleQuickfixList()<CR>:wincmd j<CR>'
|
|
|
|
|
|
|
|
"add the selected mispelled word to the local dictionary
|
|
|
|
nnoremap ?+ zg
|
|
|
|
|
|
|
|
"display a list of suggestions for the selected mispelled word
|
|
|
|
nnoremap ?? hei<C-X><C-S>
|
|
|
|
|
|
|
|
"go to the next mispelled word
|
|
|
|
nnoremap ?N ]s
|
|
|
|
|
|
|
|
"go to the previous mispelled word
|
|
|
|
nnoremap ?P [s
|
2014-04-03 23:00:34 -04:00
|
|
|
"}
|
|
|
|
|
|
|
|
"COMPLETION:{
|
2014-04-07 00:41:03 -04:00
|
|
|
"emmet switch triggerkey from <Ctrl-Y>
|
2014-06-23 05:05:08 -04:00
|
|
|
let g:user_emmet_leader_key='<C-m>'
|
2014-04-07 00:41:03 -04:00
|
|
|
|
2014-06-26 13:31:13 -04:00
|
|
|
"neocomplcache close popup and save indent
|
|
|
|
inoremap <silent> <CR> <C-r>=<SID>neocompl_cr()<CR>
|
|
|
|
function! s:neocompl_cr()
|
2014-07-10 00:00:20 -04:00
|
|
|
return pumvisible() ? neocomplcache#close_popup() : "\<CR>"
|
2014-06-26 13:31:13 -04:00
|
|
|
endfunction
|
|
|
|
"neocomplcache tab completion
|
|
|
|
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
2014-04-07 00:41:03 -04:00
|
|
|
"neocomplcache : undo completion
|
2014-06-26 13:31:13 -04:00
|
|
|
inoremap <expr><Backspace> neocomplcache#smart_close_popup()."\<C-h>"
|
|
|
|
"neocomplcache undo completion
|
|
|
|
inoremap <expr><C-u> neocomplcache#undo_completion()
|
2014-04-03 23:00:34 -04:00
|
|
|
"}
|
|
|
|
|
2014-06-25 02:47:29 -04:00
|
|
|
"FORMATTING:{
|
|
|
|
nnoremap <silent><expr> <Leader>/ ':noh<CR>:echo "Search results have been cleared"<CR>'
|
|
|
|
"}
|
|
|
|
|
2014-04-03 23:00:34 -04:00
|
|
|
"FORMATTING:{
|
2014-04-07 00:41:03 -04:00
|
|
|
"have backspace delete the selected text
|
|
|
|
vnoremap <Backspace> "_x
|
|
|
|
|
|
|
|
"formatting options to apply to the whole document
|
2014-06-26 09:14:16 -04:00
|
|
|
nnoremap <silent><expr> <Leader>J ':set tw=79<CR>Vgq:set tw=0<CR>:echo "Document text has been formatted to a width of 79 characters"<CR>'
|
2014-06-25 02:47:29 -04:00
|
|
|
vnoremap <silent><expr> <Leader>J '<Esc>:set tw=79<CR>gvgq:set tw=0<CR>:echo "Selected text has been formatted to a width of 79 characters"<CR>'
|
|
|
|
nnoremap <Leader>f mzgg=G`z<CR>:echo "The document has been formatted"<CR>
|
|
|
|
vnoremap <Leader>f mz=`z<CR>:echo "The selection has been formatted"<CR>
|
|
|
|
nnoremap <Leader>F :Autoformat<CR><CR>:echo "The document has been formatted with :Autoformat"<CR>
|
|
|
|
nnoremap <silent><expr> <Leader>w ':FixWhitespace<CR>:echo "Trailing whitespace has been removed"<CR>'
|
|
|
|
nnoremap <silent><expr> <Leader>t ':retab<CR>:noh<CR>:echo "Tabs have been converted to spaces"<CR>'
|
2014-04-07 00:41:03 -04:00
|
|
|
|
|
|
|
"tab and untab the currently selected lines
|
|
|
|
vnoremap <Tab> >gv
|
|
|
|
nnoremap <Tab> v>gv<Esc>
|
|
|
|
vnoremap <S-Tab> <gv
|
|
|
|
nnoremap <S-Tab> v<gv<Esc>
|
2014-04-03 23:00:34 -04:00
|
|
|
"}
|
|
|
|
|
|
|
|
"MOVEMENT:{
|
2014-04-07 00:41:03 -04:00
|
|
|
"additional mappings for easier access
|
|
|
|
nnoremap = +
|
|
|
|
|
|
|
|
"remap keys for speedier movement
|
2014-06-26 07:35:39 -04:00
|
|
|
nnoremap <C-Up> 4k
|
|
|
|
nnoremap <C-Down> 4j
|
|
|
|
nnoremap <C-Right> <S-Right>
|
|
|
|
nnoremap <C-Left> <S-Left>
|
2014-04-07 00:41:03 -04:00
|
|
|
|
|
|
|
"remap keys to scroll to the end in a direction
|
2014-06-26 07:35:39 -04:00
|
|
|
nnoremap <S-Up> gg0
|
|
|
|
nnoremap <S-Down> G$
|
|
|
|
nnoremap <S-Right> $
|
|
|
|
nnoremap <S-Left> ^
|
2014-04-07 00:41:03 -04:00
|
|
|
|
|
|
|
"remap alt+up/down to move blocks up/down a line
|
|
|
|
vmap <A-Up> <Plug>MoveBlockUp
|
|
|
|
vmap <A-Down> <Plug>MoveBlockDown
|
|
|
|
nmap <A-Up> <Plug>MoveLineUp
|
|
|
|
nmap <A-Down> <Plug>MoveLineDown
|
|
|
|
|
|
|
|
"remap alt+left/right/h/l to move blocks up/down a half page
|
|
|
|
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
|
2014-04-07 10:04:48 -04:00
|
|
|
|
2014-04-07 12:05:52 -04:00
|
|
|
"map signify to ]c and [c
|
|
|
|
let g:signify_mapping_next_hunk = ']c'
|
|
|
|
let g:signify_mapping_prev_hunk = '[c'
|
|
|
|
|
|
|
|
"move to next/previous difference (vimdiff/signify)
|
2014-04-07 10:04:48 -04:00
|
|
|
nmap >> ]c
|
|
|
|
nmap << [c
|
2014-04-03 23:00:34 -04:00
|
|
|
"}
|
|
|
|
|
|
|
|
"SELECTION:{
|
2014-04-07 00:41:03 -04:00
|
|
|
"ctrl-a to select all (and an alt for screen users)
|
|
|
|
nnoremap <C-a> gg0vG$
|
|
|
|
xnoremap <C-a> <Esc>gg0vG$
|
|
|
|
nnoremap <Leader>a <Esc>gg0vG$
|
|
|
|
xnoremap <Leader>a gg0vG$
|
|
|
|
|
|
|
|
"map remap keys for speedier text selection
|
2014-06-26 07:35:39 -04:00
|
|
|
xnoremap <C-Up> 4k
|
|
|
|
xnoremap <C-Down> 4j
|
|
|
|
xnoremap <C-Right> <S-Right>
|
|
|
|
xnoremap <C-Left> <S-Left>
|
2014-04-07 00:41:03 -04:00
|
|
|
|
|
|
|
"remap keys to select all text in one direction
|
2014-06-26 07:35:39 -04:00
|
|
|
xnoremap <S-Up> gg0
|
|
|
|
xnoremap <S-Down> G$
|
|
|
|
xnoremap <S-Right> $
|
|
|
|
xnoremap <S-Left> ^
|
2014-04-03 23:00:34 -04:00
|
|
|
"}
|
|
|
|
|
2014-04-30 10:15:07 -04:00
|
|
|
"COPY PASTE AND UNDO REDO:{
|
2014-04-07 00:41:03 -04:00
|
|
|
"display contents of paste buffers
|
|
|
|
nnoremap <silent><expr> <Leader>p ':reg<CR>'
|
|
|
|
|
|
|
|
"allow y to copy a single character in normal mode
|
|
|
|
nnoremap y vy<Esc>
|
|
|
|
|
2014-04-30 10:15:07 -04:00
|
|
|
"P pastes and replaces the buffer, p pastes and keeps it
|
2014-04-07 00:41:03 -04:00
|
|
|
vnoremap P p
|
|
|
|
xmap p <Plug>ReplaceWithRegisterVisual
|
|
|
|
|
2014-04-30 10:15:07 -04:00
|
|
|
"Alternatives to cut/deletion commands that don't replace the buffer
|
2014-04-07 00:41:03 -04:00
|
|
|
nnoremap <Leader>x "_x
|
2014-04-30 10:15:07 -04:00
|
|
|
vnoremap <Leader>x "_x
|
2014-04-07 00:41:03 -04:00
|
|
|
nnoremap <Leader>X "_X
|
2014-04-30 10:15:07 -04:00
|
|
|
vnoremap <Leader>X "_X
|
2014-04-07 00:41:03 -04:00
|
|
|
nnoremap <Leader>D "_D
|
2014-04-30 10:15:07 -04:00
|
|
|
vnoremap <Leader>D "_D
|
|
|
|
nnoremap <Leader>dd "_dd hello and good day
|
2014-04-07 00:41:03 -04:00
|
|
|
nnoremap <Leader>dw "_dw
|
2014-04-30 10:15:07 -04:00
|
|
|
vnoremap <Leader>d "_d
|
|
|
|
|
|
|
|
"map copy/paste shortcuts to more typical ones
|
2014-04-30 10:19:33 -04:00
|
|
|
nnoremap <C-v> P
|
2014-04-30 10:15:07 -04:00
|
|
|
xmap <C-v> <Plug>ReplaceWithRegisterVisual
|
|
|
|
inoremap <C-v> <C-O>p
|
|
|
|
nnoremap <C-c> y
|
|
|
|
vnoremap <C-c> y
|
|
|
|
nnoremap <C-x> x
|
|
|
|
vnoremap <C-x> x
|
|
|
|
|
|
|
|
"remap ctrl-u and ctrl-w to safer alternatives
|
|
|
|
inoremap <C-u> <C-g>u<c-u>
|
|
|
|
inoremap <C-w> <C-g>u<c-w>
|
2014-04-03 23:00:34 -04:00
|
|
|
"}
|
2014-03-28 22:12:13 -04:00
|
|
|
"}}}
|
2014-03-11 03:05:09 -04:00
|
|
|
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
"FILETYPE SPECIFIC MAPPINGS: {{{
|
2014-04-09 13:04:34 -04:00
|
|
|
"extradite
|
|
|
|
autocmd FileType extradite map <buffer> <Right> <Down>
|
|
|
|
autocmd FileType extradite map <buffer> l j
|
|
|
|
autocmd FileType extradite map <buffer> <Left> <Up>
|
|
|
|
autocmd FileType extradite map <buffer> h k
|
2014-07-02 03:49:34 -04:00
|
|
|
autocmd FileType extradite map <buffer> <F4> q
|
2014-04-09 13:04:34 -04:00
|
|
|
|
|
|
|
"gundo
|
|
|
|
autocmd FileType gundo map <buffer> <LeftMouse> <LeftMouse>0l
|
|
|
|
autocmd FileType gundo map <buffer> <MiddleMouse> <LeftMouse>
|
|
|
|
autocmd FileType gundo map <buffer> <RightMouse> <LeftMouse>
|
|
|
|
autocmd FileType gundo map <buffer> <Right> <Down>
|
|
|
|
autocmd FileType gundo map <buffer> l j
|
|
|
|
autocmd FileType gundo map <buffer> <Left> <Up>
|
|
|
|
autocmd FileType gundo map <buffer> h k
|
|
|
|
|
|
|
|
"help
|
2014-04-17 12:35:49 -04:00
|
|
|
if !&diff
|
|
|
|
autocmd FileType help map <buffer> <silent><expr> q ':q<CR>'
|
2014-06-25 02:47:29 -04:00
|
|
|
autocmd FileType help map <buffer> <silent><expr> <Leader><F1> ':q<CR>'
|
2014-04-17 12:35:49 -04:00
|
|
|
endif
|
2014-04-09 13:04:34 -04:00
|
|
|
|
|
|
|
"markdown: launch table of contents instead of the tagbar
|
2014-06-25 02:47:29 -04:00
|
|
|
autocmd FileType mkd map <buffer> <silent><expr> <F3> ':Toch<CR>'
|
2014-04-09 13:04:34 -04:00
|
|
|
|
|
|
|
"markdown table of contents
|
|
|
|
autocmd FileType qf map <buffer> <LeftMouse> <LeftMouse>0
|
|
|
|
autocmd FileType qf map <buffer> <MiddleMouse> <LeftMouse>
|
|
|
|
autocmd FileType qf map <buffer> <RightMouse> <LeftMouse>
|
|
|
|
autocmd FileType qf map <buffer> <2-LeftMouse> <CR>
|
|
|
|
autocmd FileType qf map <buffer> <Space> <CR><C-w>p
|
|
|
|
autocmd FileType qf map <buffer> <Left> <Up>
|
|
|
|
autocmd FileType qf map <buffer> <Right> <Down>
|
|
|
|
autocmd FileType qf map <buffer> h j
|
|
|
|
autocmd FileType qf map <buffer> l k
|
2014-06-13 00:58:13 -04:00
|
|
|
autocmd FileType qf map <buffer> <silent><expr> q ':hide<CR>'
|
2014-06-25 02:47:29 -04:00
|
|
|
autocmd FileType qf map <buffer> <silent><expr> ?<Space> ':hide<CR>'
|
2014-04-09 13:04:34 -04:00
|
|
|
|
2014-04-07 10:04:48 -04:00
|
|
|
"vimdiff
|
2014-04-08 03:39:10 -04:00
|
|
|
autocmd FilterWritePre * if &diff|nnoremap <buffer> <silent><expr> <Leader><> ':diffu<CR>'|endif
|
|
|
|
autocmd FilterWritePre * if &diff|nnoremap <buffer> <silent><expr> <Leader>>< ':diffu<CR>'|endif
|
|
|
|
autocmd FilterWritePre * if &diff|nnoremap <buffer> <Leader>> dp|endif
|
|
|
|
autocmd FilterWritePre * if &diff|nnoremap <buffer> <Leader>< do|endif
|
2014-04-07 10:04:48 -04:00
|
|
|
autocmd FilterWritePre * if &diff|cabbrev q! qall!|endif
|
|
|
|
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
"vimfiler
|
2014-04-09 13:04:34 -04:00
|
|
|
autocmd FileType vimfiler map <buffer> <LeftMouse> <LeftMouse>0
|
|
|
|
autocmd FileType vimfiler map <buffer> <MiddleMouse> <LeftMouse>
|
|
|
|
autocmd FileType vimfiler map <buffer> <RightMouse> <LeftMouse>
|
|
|
|
autocmd FileType vimfiler map <buffer> <2-LeftMouse> <Plug>(vimfiler_edit_file)
|
|
|
|
autocmd FileType vimfiler map <buffer> <Right> l
|
|
|
|
autocmd FileType vimfiler map <buffer> <Left> h
|
|
|
|
autocmd FileType vimfiler map <buffer> ' e
|
2014-06-13 00:58:13 -04:00
|
|
|
autocmd FileType vimfiler map <buffer> ~ q
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
"}}}
|
|
|
|
|
2014-06-13 00:58:13 -04:00
|
|
|
"DISABLED MAPPINGS FOR FILETYPES: {{{
|
2014-04-09 13:04:34 -04:00
|
|
|
"remove incompatible toggles from specific file types
|
2014-07-02 03:49:34 -04:00
|
|
|
autocmd Filetype qf,gundo,vimfiler,tagbar,extradite,help noremap <buffer> ` <Nop>
|
2014-06-25 02:47:29 -04:00
|
|
|
autocmd Filetype qf,vimfiler,extradite,help noremap <buffer> <F2> <Nop>
|
2014-07-02 03:49:34 -04:00
|
|
|
autocmd Filetype qf,gundo,vimfiler,extradite,help noremap <buffer> <F3> <Nop>
|
2014-06-25 02:47:29 -04:00
|
|
|
autocmd Filetype ggundo,vimfiler,extradite,tagbar,help noremap <buffer> ?<Space> <Nop>
|
2014-07-02 03:49:34 -04:00
|
|
|
autocmd Filetype qf,gundo,vimfiler,tagbar,help,diff noremap <buffer> <F4> <Nop>
|
2014-06-13 00:58:13 -04:00
|
|
|
|
|
|
|
"disable modifier keys with directions that would interfere with logic
|
2014-07-02 03:49:34 -04:00
|
|
|
autocmd Filetype qf,gundo,vimfiler noremap <buffer> <C-Up> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler noremap <buffer> <C-k> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler noremap <buffer> <C-Down> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler noremap <buffer> <C-j> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler,extradite noremap <buffer> <C-Right> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler,extradite noremap <buffer> <C-l> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler,extradite noremap <buffer> <C-Left> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler,extradite noremap <buffer> <C-h> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler noremap <buffer> <S-Up> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler noremap <buffer> <S-k> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler noremap <buffer> <S-Down> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler noremap <buffer> <S-j> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler,extradite noremap <buffer> <S-Right> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler,extradite noremap <buffer> <S-l> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler,extradite noremap <buffer> <S-Left> <Nop>
|
|
|
|
autocmd Filetype qf,gundo,vimfiler,extradite noremap <buffer> <S-h> <Nop>
|
2014-03-11 03:05:09 -04:00
|
|
|
"}}}
|