make more mappings use Alt + readme
This commit is contained in:
14
README.md
14
README.md
@@ -163,7 +163,7 @@ of plugins above to learn more.
|
|||||||
|
|
||||||
* `,z` - go to previous buffer (:bp)
|
* `,z` - go to previous buffer (:bp)
|
||||||
* `,x` - go to next buffer (:bn)
|
* `,x` - go to next buffer (:bn)
|
||||||
* `Cmd-j` and `Cmd-k` to move up and down roughly by functions
|
* `Cmd-j` and `Cmd-k` to move up and down roughly by functions (`Alt` in Linux)
|
||||||
* `Ctrl-o` - Old cursor position - this is a standard mapping but very useful, so included here
|
* `Ctrl-o` - Old cursor position - this is a standard mapping but very useful, so included here
|
||||||
* `Ctrl-i` - opposite of Ctrl-O (again, this is standard)
|
* `Ctrl-i` - opposite of Ctrl-O (again, this is standard)
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ of plugins above to learn more.
|
|||||||
* `,b` - CtrlP buffer selector - great for jumping to a file you already have open
|
* `,b` - CtrlP buffer selector - great for jumping to a file you already have open
|
||||||
* `Cmd-Shift-M` - jump to method - CtrlP tag search within current buffer
|
* `Cmd-Shift-M` - jump to method - CtrlP tag search within current buffer
|
||||||
* `,jm` jump to models. Other `,j` mappings: `,jc` for controllers, `,jh` for helpers, etc. If you think of a concept and a letter, we've got you covered.
|
* `,jm` jump to models. Other `,j` mappings: `,jc` for controllers, `,jh` for helpers, etc. If you think of a concept and a letter, we've got you covered.
|
||||||
* `Cmd-Shift-N` - NERDTree toggle
|
* `Cmd-Shift-N` - NERDTree toggle (`Alt` in Linux)
|
||||||
* `Ctrl-\` - Show current file in NERDTree
|
* `Ctrl-\` - Show current file in NERDTree
|
||||||
* `Cmd-Shift-P` - Clear CtrlP cache
|
* `Cmd-Shift-P` - Clear CtrlP cache
|
||||||
|
|
||||||
@@ -201,13 +201,13 @@ of plugins above to learn more.
|
|||||||
|
|
||||||
* Cmd-Space to autocomplete. Tab for snipmate snippets.
|
* Cmd-Space to autocomplete. Tab for snipmate snippets.
|
||||||
* `,#` `,"` `,'` `,]` `,)` `,}` to surround a word in these common wrappers. the # does #{ruby interpolation}. works in visual mode (thanks @cj). Normally these are done with something like `ysw#`
|
* `,#` `,"` `,'` `,]` `,)` `,}` to surround a word in these common wrappers. the # does #{ruby interpolation}. works in visual mode (thanks @cj). Normally these are done with something like `ysw#`
|
||||||
* `Cmd-'`, `Cmd-"`, `Cmd-]`, `Cmd-)`, etc to change content inside those surrounding marks. You don't have to be inside them.
|
* `Cmd-'`, `Cmd-"`, `Cmd-]`, `Cmd-)`, etc to change content inside those surrounding marks. You don't have to be inside them (`Alt` in Linux)
|
||||||
* `,.` to go to last edit location (same as `'.`) because the apostrophe is hard on the pinky
|
* `,.` to go to last edit location (same as `'.`) because the apostrophe is hard on the pinky
|
||||||
* `,ci` to change inside any set of quotes/brackets/etc
|
* `,ci` to change inside any set of quotes/brackets/etc
|
||||||
|
|
||||||
#### Tabs, Windows, Splits
|
#### Tabs, Windows, Splits
|
||||||
|
|
||||||
* Use `Cmd-1` thru `Cmd-9` to switch to a specific tab number (like iTerm and Chrome) - and tabs have been set up to show numbers
|
* Use `Cmd-1` thru `Cmd-9` to switch to a specific tab number (like iTerm and Chrome) - and tabs have been set up to show numbers (`Alt` in Linux)
|
||||||
* `Ctrl-h,l,j,k` - to move left, right, down, up between splits
|
* `Ctrl-h,l,j,k` - to move left, right, down, up between splits
|
||||||
* `Q` - Intelligent Window Killer. Close window `wincmd c` if there are multiple windows to same buffer, or kill the buffer `bwipeout` if this is the last window into it.
|
* `Q` - Intelligent Window Killer. Close window `wincmd c` if there are multiple windows to same buffer, or kill the buffer `bwipeout` if this is the last window into it.
|
||||||
* `vv` - vertical split (`Ctrl-w,v`)
|
* `vv` - vertical split (`Ctrl-w,v`)
|
||||||
@@ -233,13 +233,13 @@ of plugins above to learn more.
|
|||||||
* `,he` - Html Escape
|
* `,he` - Html Escape
|
||||||
* `,hu` - Html Unescape
|
* `,hu` - Html Unescape
|
||||||
* `,hp` - Html Preview (open in Safari)
|
* `,hp` - Html Preview (open in Safari)
|
||||||
* `Cmd-Shift-A` - align things (type a character/expression to align by, works in visual mode or by itself)
|
* `Cmd-Shift-A` - align things (type a character/expression to align by, works in visual mode or by itself) (`Alt` in Linux)
|
||||||
* `:ColorToggle` - turn on #abc123 color highlighting (useful for css)
|
* `:ColorToggle` - turn on #abc123 color highlighting (useful for css)
|
||||||
* `:Gitv` - Git log browsers
|
* `:Gitv` - Git log browsers
|
||||||
* `,hi` - show current Highlight group. if you don't like the color of something, use this, then use `hi! link [groupname] [anothergroupname]` in your vimrc.after to remap the color. You can see available colors using `:hi`
|
* `,hi` - show current Highlight group. if you don't like the color of something, use this, then use `hi! link [groupname] [anothergroupname]` in your vimrc.after to remap the color. You can see available colors using `:hi`
|
||||||
* `,gt` - Go Tidy - tidy up your html code (works on a visual selection)
|
* `,gt` - Go Tidy - tidy up your html code (works on a visual selection)
|
||||||
* `:Wrap` - wrap long lines (e.g. when editing markdown files).
|
* `:Wrap` - wrap long lines (e.g. when editing markdown files)
|
||||||
* `Cmd-/` - toggle comments (usually gcc from tComment)
|
* `Cmd-/` - toggle comments (usually gcc from tComment) (`Alt` in Linux)
|
||||||
* `gcp` (comment a paragraph)
|
* `gcp` (comment a paragraph)
|
||||||
|
|
||||||
#### Rails & Ruby
|
#### Rails & Ruby
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
" a lot of hand movement. Vim to the rescue
|
" a lot of hand movement. Vim to the rescue
|
||||||
"
|
"
|
||||||
" Now using the middle finger of either hand you can type
|
" Now using the middle finger of either hand you can type
|
||||||
" underscores with Ctrl-k or Ctrl-d, and add Shift
|
" underscores with Alt-k or Alt-d, and add Shift
|
||||||
" to type dashes
|
" to type dashes
|
||||||
imap <silent> <C-k> _
|
imap <silent> <A-k> _
|
||||||
imap <silent> <C-d> _
|
imap <silent> <A-d> _
|
||||||
imap <silent> <C-K> -
|
imap <silent> <A-K> -
|
||||||
imap <silent> <C-D> -
|
imap <silent> <A-D> -
|
||||||
|
|
||||||
" Change inside various enclosures with Ctrl-" and Ctrl-'
|
" Change inside various enclosures with Alt-" and Alt-'
|
||||||
" The f makes it find the enclosure so you don't have
|
" The f makes it find the enclosure so you don't have
|
||||||
" to be standing inside it
|
" to be standing inside it
|
||||||
nnoremap <A-'> f'ci'
|
nnoremap <A-'> f'ci'
|
||||||
@@ -29,23 +29,23 @@ nnoremap <A-[> f[ci[
|
|||||||
nnoremap <A-]> f]ci]
|
nnoremap <A-]> f]ci]
|
||||||
|
|
||||||
" ==== NERD tree
|
" ==== NERD tree
|
||||||
" Ctrl-Shift-N for nerd tree
|
" Alt-Shift-N for nerd tree
|
||||||
nmap <C-N> :NERDTreeToggle<CR>
|
nmap <A-N> :NERDTreeToggle<CR>
|
||||||
|
|
||||||
" move up/down quickly by using Ctrl-j, Ctrl-k
|
" move up/down quickly by using Alt-j, Alt-k
|
||||||
" which will move us around by functions
|
" which will move us around by functions
|
||||||
nnoremap <silent> <C-j> }
|
nnoremap <silent> <A-j> }
|
||||||
nnoremap <silent> <C-k> {
|
nnoremap <silent> <A-k> {
|
||||||
autocmd FileType ruby map <buffer> <C-j> ]m
|
autocmd FileType ruby map <buffer> <A-j> ]m
|
||||||
autocmd FileType ruby map <buffer> <C-k> [m
|
autocmd FileType ruby map <buffer> <A-k> [m
|
||||||
autocmd FileType rspec map <buffer> <C-j> }
|
autocmd FileType rspec map <buffer> <A-j> }
|
||||||
autocmd FileType rspec map <buffer> <C-k> {
|
autocmd FileType rspec map <buffer> <A-k> {
|
||||||
autocmd FileType javascript map <buffer> <C-k> }
|
autocmd FileType javascript map <buffer> <A-k> }
|
||||||
autocmd FileType javascript map <buffer> <C-j> {
|
autocmd FileType javascript map <buffer> <A-j> {
|
||||||
|
|
||||||
" Command-/ to toggle comments
|
" Command-/ to toggle comments
|
||||||
map <C-/> :TComment<CR>
|
map <A-/> :TComment<CR>
|
||||||
imap <C-/> <Esc>:TComment<CR>i
|
imap <A-/> <Esc>:TComment<CR>i
|
||||||
|
|
||||||
" Use Alt- numbers to pick the tab you want
|
" Use Alt- numbers to pick the tab you want
|
||||||
map <silent> <A-1> :tabn 1<cr>
|
map <silent> <A-1> :tabn 1<cr>
|
||||||
@@ -73,9 +73,9 @@ nnoremap <C-Right> <C-w>>
|
|||||||
" ============================
|
" ============================
|
||||||
" Tabularize - alignment
|
" Tabularize - alignment
|
||||||
" ============================
|
" ============================
|
||||||
" Hit Ctrl-Shift-A then type a character you want to align by
|
" Hit Alt-Shift-A then type a character you want to align by
|
||||||
nmap <C-A> :Tabularize /
|
nmap <A-A> :Tabularize /
|
||||||
vmap <C-A> :Tabularize /
|
vmap <A-A> :Tabularize /
|
||||||
|
|
||||||
" Source current file Ctrl-% (good for vim development)
|
" Source current file Alt-% (good for vim development)
|
||||||
map <C-%> :so %<CR>
|
map <A-%> :so %<CR>
|
||||||
|
|||||||
Reference in New Issue
Block a user