-
-
Save som-poddar/e7cc7f351ab7c664e6b5 to your computer and use it in GitHub Desktop.
Key Bindings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------------------------- | |
KeyBoard ShortCuts | |
---------------------------------------------------------------------------------------- | |
: Grep : | |
grep 'text' /folder/file.log Regular search (-c adds count, -n adds line no., --color options add color) | |
grep -i 'text' /folder/file.log Ignore case | |
grep -r 'text' /folder/ search recursively (-h will hide file names) | |
grep -w 'word' /folder/file.log search for word only | |
grep -v 'text' /folder/file.log Invert search | |
grep -l 'main' *.c -l option to list file name whose contents mention | |
egrep -w 'word1|word2' /folder/file.log search for words only |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------------------------- | |
KeyBoard ShortCuts | |
---------------------------------------------------------------------------------------- | |
: Nano : | |
^A move to beginning of line | |
^E move to end of line | |
^V move down a page | |
^Y move up a page | |
^_ move to a specific line | |
^_^V moves to the bottom of the file | |
^_^Y to the top | |
^C find out what line the cursor is currently on | |
^W search for some text. | |
^D delete character currently under the cursor | |
BackSpace delete character currently in front of the cursor | |
^K delete entire line | |
^\ search for (and replace) a string of characters | |
^U paste | |
^O save contents without exiting (you will be prompted for a file to save to) | |
^X exit nano (you will be prompted to save your file if you haven't) | |
^T when saving a file, opens a browser that allows you to select a file name from a list of files and directories |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------------------------- | |
KeyBoard ShortCuts | |
---------------------------------------------------------------------------------------- | |
: Sublime Text : | |
Command + Shift + V Paste with indentation | |
Ctrl + Shift + K Delete line | |
Command + K K Delete from cursor to end of line | |
Command + K Backspace Delete from cursor to beginning of line | |
Command + Shift + D Duplicate line / selection | |
Command + Shift + Enter Insert line before | |
Command + Enter Insert line after | |
Command + L Select line | |
Command + J Join next line end of the current line | |
Command + ] Indent line(s) | |
Command + [ UnIndent line(s) | |
Command + Shift + L Split selection into lines | |
Command + D Add next occurence to selection | |
Ctrl + Command + G Add all occurences to selection | |
Ctrl + M Go to closing / opening parenthesis | |
Ctrl + Shift + M Select contents inside parenthesis | |
Command + Shift + J Expand selection to indentation | |
Command + R Goto symbol |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------------------------- | |
KeyBoard ShortCuts | |
---------------------------------------------------------------------------------------- | |
: Terminal : | |
Ctrl + a Go to the beginning of the line (Home) (Command + Left Arrow) | |
Ctrl + e Go to the End of the line (End) (Command + Right Arrow) | |
Alt + Right-Arrow Back (left) one word | |
Alt + Leftt-Arrow Forward (right) one word | |
Ctrl + xx Toggle between the start of line and current cursor position | |
Ctrl + L Clear the Screen, similar to the clear command | |
Ctrl + w Cut the Word before the cursor to the clipboard. | |
Ctrl + k Cut the Line after the cursor to the clipboard. | |
Ctrl + u Cut/delete the Line before the cursor position. | |
ctrl + y Paste the last thing to be cut (yank) | |
Ctrl + r Recall the last command including the specified character(s) | |
Ctrl + p Previous command in history (i.e. walk back through the command history) | |
Ctrl + n Next command in history (i.e. walk forward through the command history) | |
Ctrl + g Escape from history searching mode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment