My bash configuration files with a couple of useful aliases.
Fire up your terminal and type the following in it:
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/wschott/dotfiles/main/install)"
Don't worry, all your old files will be backed up!
$ git clone git://github.com/wschott/dotfiles.git ~/.dotfiles
$ ~/.dotfiles/install
by running:
$ ~/.dotfiles/install
Hints: ⎋
= ESC, ⌃
= CTRL, ␣
= SPACE, ⌘
= CMD on OSX
;;
=:
— easier command typingjj
,jk
,;;
— exit to normal modeH
,L
— go to start/end of line (EOL)U
— redoY
— yank (copy) from cursor to EOL⎋⎋
— hide search highlightsQ
— reformat paragraphS
— split line (opposite ofJ
to join lines)>
,<
— indent/deindent current block.
— repeat last command>
,.
— indent many times<
,.
— deindent many times
gw
— swap words- {insert}
⌃F
— omni completion ␣
— fold/unfold current folding;s
— substitute (search & replace);*
— replace word under cursor;c
— find VCS merge conflict marker;1
— add a Markdown H1 below current line;v
— select the just pasted text- {insert}
⌃v
— paste from OS clipboard ;y
,;Y
— copy to OS clipboard;p
,;P
— paste from OS clipboard;vs
— reload .vimrc%%
— puts the current path to the command line;ft
— fold html tag;S
— sort CSS properties
;e
— edit;t
— tabedit;es
— split;ev
— vsplit;w
— save;W
,;x
— save and close file;q
— close file;Q
— close all files;d
— open directory of current file in current tab;dt
— open directory of current file in new tab
⌃j
,⌃k
— go to previous/next tab
⌃h
,⌃l
— go to left/right split;H
,;L
— create a split on the left/right side;K
,;J
— create a split above/below+
,-
=_
— increase/decrease split size;=
— set width of all splits to equal sizeT
— move split window into new tab;mw
and;pw
— swap split windows;mw
— mark first window for swap;pw
— swap current window with the previously marked one
;pp
— toggle paste mode;\
— toggle line wrapping;inv
— toggle invisibles;num
— toggle line numbers;C
— toggle "keep current line in the center of the screen" mode
_d
— diff_md
— markdown
⌘k
,⌘{
— go to previous tab⌘j
,⌘}
— go to next tab⌘1
–⌘9
— switch to tab #
- Tommy Morgan
- Gianni Chiappetta (gf3)
- Zach Holman (holman)
- Ryan Tomayko (rtomayko)
- Henrik Nyh (henrik)
- Mathias Bynens (mathiasbynens)
- Jan Moesen (janmoesen)
- Steve Losh (sjl)
- challendy
- carlhuda
- yodiaditya
- How I boosted my Vim » nvie.com
- http://www.jukie.net/~bart/conf/vimrc
- http://stackoverflow.com/questions/164847/what-is-in-your-vimrc/171558#171558
- http://stackoverflow.com/questions/2586984/how-can-i-swap-positions-of-two-open-files-in-splits-in-vim/4903681#4903681
- http://technotales.wordpress.com/2010/04/29/vim-splits-a-guide-to-doing-exactly-what-you-want/
- http://concisionandconcinnity.blogspot.de/2009/07/vim-part-ii-matching-pairs.html