-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprivate_dot_ideavimrc
More file actions
124 lines (93 loc) 路 2.69 KB
/
Copy pathprivate_dot_ideavimrc
File metadata and controls
124 lines (93 loc) 路 2.69 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
"""""""""" stuff from .vimrc
set nocompatible
filetype off
call plug#begin()
Plug 'unblevable/quick-scope'
Plug 'tpope/vim-surround'
Plug 'michaeljsmith/vim-indent-object'
call plug#end()
inoremap jk <ESC>
map <Space> <Leader>
" Make Y behave like C and D
nnoremap Y y$
" Move to window
nnoremap <leader>h <C-w>h
nnoremap <leader>j <C-w>j
nnoremap <leader>k <C-w>k
nnoremap <leader>l <C-w>l
" Bind Ctrl-V to Space + V to avoid confusion with pasting
nnoremap <leader>v <C-v>
"This unsets the 'last search pattern' register by hitting return
nnoremap <CR> :noh<CR>
" Navigate snake_case easier
set iskeyword-=_
" highlight the visual selection after pressing enter.
xnoremap <silent> <cr> "*y:silent! let searchTerm = '\V'.substitute(escape(@*, '\/'), "\n", '\\n', "g") <bar> let @/ = searchTerm <bar> echo '/'.@/ <bar> call histadd("search", searchTerm) <bar> set hls<cr>
syntax on
set number
set tabstop=2
set shiftwidth=2
set expandtab
set ai
set ruler
set noswapfile
set hlsearch
set ignorecase
set incsearch
set splitright
set splitbelow
hi Normal guibg=NONE ctermbg=NONE
set nowrap " do not automatically wrap on load
set formatoptions-=t " do not automatically wrap text when typing
highlight comment ctermfg=green
highlight link myTodo Todo
colorscheme catppuccin-macchiato "catppuccin catppuccin-latte, catppuccin-frappe, catppuccin-mocha
" Disable spaces being added before the closing bracket
let g:AutoPairsMapSpace = 0
" Additional bindings for scrolling
nnoremap <leader>d <C-d>
nnoremap <leader>u <C-u>
"""""""""" IdeaVim stuff
sethandler <C-2> a:vim
sethandler <C-A> a:vim
sethandler <C-C> a:ide
sethandler <C-D> a:vim
sethandler <C-E> a:ide
sethandler <C-F> a:ide
sethandler <C-G> a:vim
sethandler <C-H> a:ide
sethandler <C-I> a:vim
sethandler <C-J> a:vim
sethandler <C-K> a:ide
sethandler <C-L> a:vim
sethandler <C-M> a:ide
sethandler <C-N> a:ide
sethandler <C-O> a:vim
sethandler <C-P> a:vim
sethandler <C-Q> a:vim
sethandler <C-R> a:vim
sethandler <C-S> a:vim
sethandler <C-T> a:vim
sethandler <C-U> a:vim
sethandler <C-V> a:ide
sethandler <C-W> a:ide
sethandler <C-X> a:vim
sethandler <C-Y> a:vim
set visualbell
set noerrorbells
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
"" Map \r to the Reformat Code action
"map \r <Action>(ReformatCode)
"" Map <leader>d to start debug
"map <leader>d <Action>(Debug)
"" Map \b to toggle the breakpoint on the current line
"map \b <Action>(ToggleLineBreakpoint)
" Find more examples here: https://jb.gg/share-ideavimrc
" Navigate camelCase with shift motions
map W [w
map E ]w
" Splitting tabs with leaders
map <leader>a <Action>(MoveEditorToOppositeTabGroup)
map <leader>s <Action>(MoveTabDown)
map <leader>d <Action>(MoveTabRight)
set quickscope