-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshortcuts-practice.txt
More file actions
162 lines (120 loc) · 2.81 KB
/
shortcuts-practice.txt
File metadata and controls
162 lines (120 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<<<<<<< HEAD
# search for text, grep
grep -Rnw '.' -e 'searchtext'
-R is recursive
-n is line number
-w is whole word
=======
# cycle through highlighted words
Place your cursor on the word you want to highlight.
Press * to search for the word under the cursor.
To select the next match:
Enter Visual Mode (v or V or Ctrl-v) first, then type gn. This selects the next match.
Continue pressing gn to select further matches and edit.
>>>>>>> a90eab10242709faee2cb45df2ebe8448baa6af6
# create vertical split
:vsp
# toggle between vertical splits
CTRL + w + w
# set tab length
:set tabstop=2
:set shiftwidth=2
# highlight word
ctrl + space
# jump to definition
ctrl + ]
# Copy a line
yy
# Multiline comments
# add comment
CTRL + V, Shift + I, #, ESC
# remove comment
CTRL + V, Shift + I, #, x, ESC
# Apex language server LSP
https://github.com/aheber/tree-sitter-sfapex/blob/main/nvim-treesitter-setup.md
# Search files
Space + sf
# Go to definition
gd
# Go to implementation
gi
# Go to references
gr
# :Telescope keymaps
# :Mason
install new lsp
/search for which lsp to install, type i to install
# Recently opened files
Space + ?
# Recently opened buffers
Space + Space
# Search within currently open file
Space + /
# Search words within file
Space + sw
# (look in telescope keymaps to find setup shortcuts)
# Grab a bigger syntac region
CTRL + Space
# Next function
] + m
# Previous function
[ + m
# scroll screen down
CTRL + e
# scroll screen up
CTRL + y
# Copilot setup
:Copilot setup
:Copilot enable
# .zprofile vim as nvim alias
alias vim="nvim"
# .zprofile go air server
alias air='~/go/bin/air'
# .zprofile homebrew
eval "$(/opt/homebrew/bin/brew shellenv)"
# Edit alternate file or last edited file
CTRL + ^
# install go air server
go install github.com/cosmtrek/air@latest
# map create example
```
Map<Date, List<Task>> tasksbyweek = new Map<Date, List<Task>>();
for(Task t : tasks) {
Date weekstart = new Date();
if(tasksbyweek.get(weekstart)==null)
tasksbyweek.put(weekstart, new List<Task>());
tasksbyweek.get(weekstart).add(t);
}
```
# toggle relative line numbers
:set rnu!
# Search highlighting
:set hlsearch
:set nohlsearch
# open split tab
CMD + d
# switch between split tabs
CMD + [, CMD + ]
# replace multple occurences
type # while cursor on word, :%s//newword/g
## move line up or down
ddp # move line down
ddkP # move line up
# move cursor foward and backwords
# forward
w # move to next word
e # move to end of word
# backword
b # move to previous word
ge # move to end of previous word
# :r
# delete around commands
dap # delete around paragraph
dip # delete inside paragraph
daw # delete around word
diw # delete inside word
di( # delete inside parentheses
di[ # delete inside brackets
di{ # delete inside curly braces
di< # delete inside angle brackets
di" # delete inside double quotes