blob: 4052ec01bfbbf42b2135f32754cd3429a5c04b95 (
plain)
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
|
call plug#begin()
Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary'
call plug#end()
let mapleader = ' '
" how do you even vim without this
set number
set relativenumber
" tbh i don't know what this does but it's some tab stuff
set tabstop = 4
set softtabstop = 4
set shiftwidth = 4
set expandtab
" this i kinda get i think
set smartindent
set wrap=false
" highlight all search results while searching (i think)
set incsearch
set hlsearch
" this is cool, J actually works
set ideajoin
nnoremap <C-j> xi<CR><Esc>f\
nmap <leader>w :w<CR>
" Focus sth (e.g. Focus Search)
nmap <leader>f; <Action>(ActivateTerminalToolWindow)
nmap <leader>f: <Action>(Terminal.OpenInTerminal)
nmap <leader>ff <Action>(ActivateProjectToolWindow)
nmap <leader>fs <Action>(FindInPath)
nmap <leader>fc <Action>(ActivateCommitToolWindow)
nmap <leader>fp <Action>(ActivateProblemsViewToolWindow)
nmap <leader>ft <Action>(ActivateUnitTestsToolWindow)
nmap <leader>fx <Action>(HideAllWindows)
" lsp ig?
nmap <leader>lr <Action>(RenameElement)
nmap <leader>lf <Action>(ReformatCode)
nmap ]d <Action>(GotoNextError)
nmap [d <Action>(GotoPreviousError)
nmap gh <Action>(ShowErrorDescription)
" system clipboard
nnoremap <leader>p "+p
nnoremap <leader>y "+y
nnoremap <leader>d "+d
nnoremap <leader>P "+P
vnoremap <leader>p "+p
vnoremap <leader>y "+y
vnoremap <leader>d "+d
vnoremap <leader>P "+P
" center stuff when navigating
nnoremap <C-d> <C-d>zz
nnoremap <C-u> <C-u>zz
nnoremap n nzz
nnoremap N Nzz
" move selected lines up one line
xnoremap K :m-2<CR>gv=gv
" move selected lines down one line
xnoremap J :m'>+<CR>gv=gv
" indentation fun
vnoremap < <gv
vnoremap > >gv
" running and stuff
nmap ,r <Action>(Run)
nmap ,d <Action>(Debug)
nmap ,cr <Action>(ContextRun)
nmap ,cd <Action>(ContextDebug)
nmap ,s <Action>(Stop)
nmap ,t <Action>(RiderUnitTestRunSolutionAction)
nmap ,f <Action>(RiderUnitTestRerunBrokenSplitAction)
" ide stuff
nmap <leader><CR> <Action>(ShowIntentionActions)
nmap <leader><leader> <Action>(GotoFile)
nmap <leader>a <Action>(GotoAction)
" goto is a bad language feature
nmap gd <Action>(GotoDeclaration)
nmap gi <Action>(GotoImplementation)
nmap gr <Action>(FindUsages)
" debugging
nmap \b <Action>(ToggleLineBreakpoint)
nmap \r <Action>(Resume)
nmap \j <Action>(StepInto)
nmap \k <Action>(StepOut)
nmap <C-\> <Action>(StepOver)
" harpoon
nmap <leader>1 :action GotoHarpoon1<CR>
nmap <leader>2 :action GotoHarpoon2<CR>
nmap <leader>3 :action GotoHarpoon3<CR>
nmap <leader>4 :action GotoHarpoon4<CR>
nmap <leader>5 :action GotoHarpoon5<CR>
nmap <leader>a :action AddToHarpoon<CR>
nmap <leader>s :action ShowHarpoon<CR>
|