this repo has no description
dotfiles
1"" Source your .vimrc
2"source ~/.vimrc
3
4" let g:EasyMotion_do_mapping = 0
5
6let mapleader=' '
7
8"" -- Suggested options --
9" Show a few lines of context around the cursor. Note that this makes the
10" text scroll if you mouse-click near the start or end of the window.
11set scrolloff=5
12
13" Do incremental searching.
14set incsearch
15set showmode
16set showcmd
17
18set nu
19set rnu
20
21augroup numbertoggle
22 autocmd!
23 autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
24 autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
25augroup END
26
27set clipboard+=unnamed,unnamedplus
28
29" Plugins
30set NERDTree
31set commentary
32set surround
33set sneak
34set easymotion
35set quickscope
36
37" IDEA features
38set ideamarks
39set ideajoin
40
41" Don't use Ex mode, use Q for formatting.
42" map Q gq
43
44map <Leader>hrr <Action>(IdeaVim.ReloadVimRc.reload)
45
46map <Leader>s<Leader> <Plug>(easymotion-prefix)
47
48"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
49"" Map \r to the Reformat Code action
50map <Leader>ff <Action>(ReformatCode)
51map <Leader>fc <Action>(CodeCleanup)
52map <Leader>fo <Action>(OverrideMethods)
53map <Leader>fi <Action>(ImplementMethods)
54map <Leader>fg <Action>(Generate)
55map <Leader>frr <Action>(Refactorings.QuickListPopupAction)
56map <Leader>frn <Action>(RenameElement)
57map <Leader>frm <Action>(Move)
58map <Leader>frd <Action>(SafeDelete)
59
60map <Leader>cc <Action>(CommentByLineComment)
61map <Leader>cb <Action>(CommentByBlockComment)
62
63"" Map <leader>d to start debug
64map <Leader>rr <Action>(Run)
65map <Leader>rd <Action>(Debug)
66map <Leader>rs <Action>(Stop)
67
68"" Map \b to toggle the breakpoint on the current line
69map <Leader>bb <Action>(ToggleLineBreakpoint)
70map <Leader>bt <Action>(ToggleTemporaryLineBreakpoint)
71map <Leader>be <Action>(ToggleBreakpointEnabled)
72
73map <Leader>bP <Action>(PinActiveEditorTab)
74
75map <Leader>a <Action>(ShowIntentionActions)
76map <Leader>ca <Action>(ShowIntentionActions)
77map <Leader>cla <Action>(ShowIntentionActions)
78
79map <Leader><Leader> <Action>(SearchEverywhere)
80
81" +code
82map <Leader>cb <Action>(GotoSuperMethod)
83map <Leader>cd <Action>(GotoDeclaration)
84map <Leader>cD <Action>(FindUsages)
85map <Leader>cr <Action>(RenameElement)
86map <Leader>ct <Action>(GotoTypeDeclaration)
87map <Leader>cS <Action>(FileStructurePopup)
88
89nmap gcc <Action>(CommentByLineComment)
90nmap gcb <Action>(CommentByBlockComment)
91vmap gc <Action>(CommentByLineComment)
92vmap gb <Action>(CommentByBlockComment)
93
94" Rider mappings
95if &ide =~? 'rider'
96 map <Leader>ci <Action>(ReSharperGotoImplementation)
97 map ]e <Action>(ReSharperGotoNextErrorInSolution)
98 map [e <Action>(ReSharperGotoPrevErrorInSolution)
99endif
100
101map [n <Action>(Back)
102map ]n <Action>(Forward)
103
104map <Leader>td <Action>(ToggleDistractionFreeMode)
105map <Leader>tz <Action>(ToggleZenMode)
106map <Leader>tp <Action>(TogglePresentationMode)
107map <Leader>tC <Action>(ToggleCompactMode)
108map <Leader>tT <Action>(VimFindActionIdAction)
109
110" NERDTree mappings
111" map <Leader>pp :NERDTree<CR>
112map <Leader>op :NERDTreeToggle<CR>
113" map <Leader>op <Action>(ActivateProjectToolWindow)
114map <Leader>oP :NERDTreeFind<CR>
115" map <Leader>oP <Action>(SelectInProjectView)
116" map <Leader>pc :NERDTreeClose<CR>
117
118" AceJump mappings
119map <Leader>saj <Action>(AceAction)
120map <Leader>sat <Action>(AceTargetAction)
121map <Leader>sal <Action>(AceLineAction)
122
123" map ]d <Action>(NextOccurence)
124" map [d <Action>(PreviousOccurence)
125
126" Disable arrow keys to encourage learning hjkl
127"noremap <Left> <Nop>
128"noremap <Right> <Nop>
129"noremap <Up> <Nop>
130"noremap <Down> <Nop>
131
132"inoremap <Left> <Nop>
133"inoremap <Right> <Nop>
134"inoremap <Up> <Nop>
135"inoremap <Down> <Nop>
136
137" Find more examples here: https://jb.gg/share-ideavimrc