| Vim folding commands |
|---|
zf#j creates a fold from the cursor down # lines.zf/string creates a fold from the cursor to string .zj moves the cursor to the next fold.zk moves the cursor to the previous fold.zo opens a fold at the cursor.zO opens all folds at the cursor.zm increases the foldlevel by one.zM closes all open folds.zr decreases the foldlevel by one.zR decreases the foldlevel to zero -- all folds will be open.zd deletes the fold at the cursor.zE deletes all folds.[z move to start of open fold.]z move to end of open fold. |
Thursday, February 21, 2013
Vim Folding Commands
https://www.linux.com/learn/tutorials/442438-vim-tips-folding-fun
Friday, February 1, 2013
OSX: pipe console output to your clipboard with pbcopy
If you wanted to copy the contents of a directory (or any output) to your clipboard just run:
ls -lta | pbcopy
Wednesday, January 23, 2013
Use SSH as a web proxy
ssh user@yourserver.com -L 8080:localhost:3128 -N
Now change your proxy settings to point to localhost:8080
Monday, December 10, 2012
Todoist : Solving cross domain security policy
From https://todoist.com/API/help
Solving cross domain security policy [top]
You cannot use AJAX to directly communicate with Todoist, this is due to browser security policy. You can solve this by communicating with Todoist using a script tag:
var script = document.createElement('script');script.type = 'text/javascript';document.getElementsByTagName('head')[0].appendChild(script); |
callbackFunction({ JSON data here }); |
Monday, December 3, 2012
Sunday, December 2, 2012
GNU Screen Cheat-Sheet
Taken from http://neophob.com/2007/04/gnu-screen-cheat-sheet/
Basics: –ctrl a c -> create new window –ctrl a A -> set window name –ctrl a w -> show all window –ctrl a 1|2|3|… -> switch to window n –ctrl a ” -> choose window –ctrl a ctrl a -> switch between window –ctrl a d -> detach window –ctrl a ? -> help –ctrl a [ -> start copy, move cursor to the copy location, press ENTER, select the chars, press ENTER to copy the selected characters to the buffer –ctrl a ] -> paste from buffer How to start screen: –screen –DR -> list of detached screen –screen –r PID -> attach detached screen session –screen –dmS MySession -> start a detached screen session –screen –r MySession -> attach screen session with name MySession Advanced: –ctrl a S -> create split screen –ctrl a TAB -> switch between split screens If you created a new split screen, the current window is empty. either select an existing window (ctrl a ”) or create a new split screen (ctrl a n). –ctrl a Q -> Kill all regions but the current one. –ctrl a X -> remove active window from split screen –ctrl a O -> logout active window (disable output) –ctrl a I -> login active window (enable output)
Subscribe to:
Posts (Atom)