<n>G
to jump to nth rowctrl+o
to jump to last curor positionctrl+n
to highlight word, again to jump to next one,ctrl-x
to skip onectrl-p
to go back-- with plugin:
c
to change the selection
- with plugin:
q:
to get a window of all last commands<CR>
to execute themJ
to move the following line to the end of this line<leader>s
to substitute word under cursor"<char>dd
deleted line into register"<char>p
pastes file from register:s/\%V\(.*\)\%V/<a href="#\1">\1<\/a>/
to surround visual selection:nohlsearch
to no longer highlight search matches:grep <word>
to find. then:cw
in search results to open in quickfix windowctrl+a
increments the next number by one,ctrl+x
decrements it http://vim.wikia.com/wiki/Increasing_or_decreasing_numbers:e <path e.g. ".">
opens a file browser that can be searched and used to edit files
ctrl+r
to serach historyctrl+l
to replaceclear
ctrl+z
to suspend process,bg
to list them,fg
to bring it back to the foreground,disown
to separate process from terminal$?
holds the exit status of the last executed command^foo^bar
takes the last command from the history and replacesfoo
withbar
- echo {"some": "json"} | python -m json.tool
pretty prints json on the cmd line
grep -A12 -B15
gives the matching lines and 12after, 15 beforeman 2
open lets you inspect level 2 (system) calls likeopen
htop
has a-d
option which lets you set the refesh interval (in tenths of seconds).htop -d 5
sets it to two times a secondless -S
turns off line wraping which is useful if you have long tabular text (like the output ofcsvlook
)renameutils
allows you to easily change file names with the editor that you are used tosort
has the-h
flag which sorts by human readble values (such as the one produced bydu -h
) which might include KB, MB etc
dir()
shows all properties/methods of an objectptpython
is a nice command line replacement foripython
import ipdb; ipdb.set_trace()
gives you an interactive debugging sessionctrl + [
orctrl + ]
to indent/unindent inipython
_
gives you the last evaluted result in (i)Python,__
the second last and so on- You can user
python -c
to execute python lineline in a shell. Example:echo 'hello cool arguments ' | python -c 'import sys; print sys.stdin.read().split()'
- IPython's input mode can be switched to vim or emacas mode. To switch it to vim mode create a config file (
ipython profile create
) and setc.TerminalInteractiveShell.editing_mode = 'vi'
in theipython_config.py
file that is created. Then you can hit escape and move around like you are used to from vim. (reference)1
inspect($(".points"))
in the console to select the element in the Elements panel
debug(YourLibrary.someFunction)
or monitor(YourLibrary.someFunction)
to be notified when function is called
Change describe
or it
to fdescdribe
or fit
to only run those tests with jasmine
git reset --soft origin/master
- This will rollback your branch to the same commit as origin/master but it keeps all the changes you have done
git stash --patch
to let you choose what you want to stash and what notgit bisect
and then git good or git bad to go on the hunt for a bug in the history- Add
-S
togit commit
(as ingit commit -S -m 'my signed commit'
) to use GPG to sign your commit. It will then show up with a checkmark on the github.com///commits page - diff so fancy for nicer highlighting and colors in diffs
\e
to edit the last executed command in default text editor- run
\watch
after a query to run this query every two seconds (just like the default unixwatch
)
- alex checks text for non inclusive language
- httpie Replaces wget/curl
webcoach
to measure performance of webpages and get advicetldr
as an example-driven alternative toman
- thefuck corrects commands that you mistyped in the console
sudo ifconfig en0 ether aa:bb:cc:dd:ee:ff
to change mac address of wifi card (useful if throttled by mac address) (maybe make sure to store your original one and reset back to it after you are done to avoid side effects)- ⌘-E finds currently selected text (in some tools)
- Apple has a long support doucment on keyborad shortcuts
heroku pg:ps
to see all running postgres processesheroku pg:killall
to kill all running postgres processes
alt-e
to edit the current line in $EDITOR (see this commit)
- The
Rainbow Brackets
Plugin colorizes matching parantheses
- if you install the iTerm2 shell integration you get convenient features such as being able to jump back to the previous command in the history with cmd-shift-up (reference)2