AnalogClock






Sunday, January 12, 2020

vscode you should know

search files
ctrl+p
type ? into search bar for help for other types of search

search editor commands
ctrl+shift+p or f1 or ctrl+p >

move line or selection up/down
alt+up/down

duplicate line or selection above/below
alt+shift+up/down

peek definition
alt+f12
you can scroll and edit in the pop-up overlay

goto definition
f12

add cursor at end of line or lines of selection
ctrl+shift+i

add cursor above below
ctrl+alt+shift+up/down

ctrl+`
open and toggle terminal window

ctrl+shit+`
open a new terminal

Saturday, November 2, 2019

pycharm you should know

search everywhere - file names, commands names, and symbol names across project
press shift key twice

search for a pycharm command by name or abbreviation or parts
ctrl+shift+a
use a space to separate parts of a search(f s) file save (fs) should work too

search for a file in the project space
ctrl+shift+n

open a recent file - searchable
ctrl+e

switch an open file or a open a panel
ctrl+tab start from the top of the open files list
ctrl+shift+tab start from the bottom of the panels list

return focus to editor window
esc

return focus to editor window and close last active panel
shif+esc

quick documentation popup for current cursor or selection
ctrl+q

quick popup of source snippet for current cursor or selection
ctrl+shit+i

return focus to last
navigate to previous or next edit location across files
ctrl+alt+left ctrl+alt+right

add a cursor AKA multi-cursor
alt+left mouse click
alt+shift+insert toggle multi-cursor mode for shifted selection

add multiple cursors and  rectangle selection
alt+shift+left mouse click and drag
use same selection method for rectangle pasting

add an import automatically to the top of the file by selecting from a popupalt+enter
use after typing the usage (datetime.datetime or just datetime)

duplicate the current line or selection
ctrl+d

move the current line or selection up or down
alt-shift-up or alt-shift-down or ctrl-shift-up or ctrl-shift-down

navigate to class method or function in current file by selecting from a popup
ctrl+f12

debug the current file
shift+f9

step into
f7

step over
f8

run the current file
shift+f10

run the current line or selection in the console
alt+shift+e

Sunday, November 25, 2018

vim you should know

If you use vim you should try these:
Use the file browser for local file management.
:browse e .
Equivalent to command line:
vim .
Use the file browser for remote file management.
:browse e scp://hostname/
Equivalent to command line:
vim scp://hostname/
Pipe to 'view -' instead of 'less' when you want syntax highlighting.
Side by side diff with editing
:e file_v1
:vert diffsplit file_v2
Equivalent to command line:
vimdiff -v file_v1 file_v2