-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathideavimrc
94 lines (67 loc) · 2.59 KB
/
ideavimrc
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
" IdeaVim settings for vim emulation in IntelliJ-based IDEs
" /~https://github.com/JetBrains/ideavim
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PLUGINS "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set surround " enable vim-surround emulation
" turn on case-insensitive matching
let g:EasyMotion_smartcase = 1
" Search for single character string in visible buffer with f<characters>
map <Leader> <Plug>(easymotion-prefix)
nmap f <Plug>(easymotion-s)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" GENERAL SETTINGS "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let mapleader = "\<Space>"
let maplocalleader = "\<Space>"
" Integrate with system clipboard
set clipboard=unnamedplus,unnamed
" Ignore case when searching
set ignorecase
" When searching try to be smart about cases
set smartcase
" message on the status line to show current mode
set showmode
" Set 7 lines to the cursor - when moving vertically using j/k
set so=7
" Makes search act like search in modern browsers
set incsearch
" If true, join command will be performed via IDE
set ideajoin=true
" global autoformat via ctrl-f
noremap <C-f> :action ReformatCode<cr>
" built in search looks better
nnoremap / :action Find<CR>
" comment a line using ctrl-/
nnoremap <C-/> :action CommentByLineComment<CR>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" MAPPINGS "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Fast saving
nmap <leader>w :w!<cr>
" Move up and down by larger steps
map <C-k> 5k
map <C-j> 5j
" Remap VIM 0 to first non-blank character
map 0 ^
" Treat long lines as break lines
map j gj
map k gk
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" EXPERIMENTAL "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Always show current position
set ruler
" Enable persisted undo history
set undofile
set undodir=~/.vim-local/undo-dir/
" make 'tab' insert indents instead of tabs at the beginning of a line
set smarttab
" size of an 'indent'
set shiftwidth=2
" Highlight search results
set hlsearch
" Show matching brackets when text indicator is over them
set showmatch
" always uses spaces instead of tab characters
set expandtab