-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathideavimrc
100 lines (71 loc) · 2.33 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
95
96
97
98
99
100
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"" General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Always keep top/bottom of file x lines away from the cursor
set scrolloff=8
" Turn on the Wild menu (suggestions for command line autocomplete)
set wildmenu
" Ignore compiled files
set wildignore=*.o,*~,*.pyc,*.git,*.hg,*.svn
" Always show current position
set ruler
" Height of the command bar
set cmdheight=2
" Configure backspace so it acts as it should act
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
" Ignore case when searching
set ignorecase
" When 'ignorecase' and 'smartcase' are both on, if a pattern contains an uppercase letter, it is case sensitive
set smartcase
" Highlight search results
set hlsearch
" Makes search act like search in modern browsers
set incsearch
" Don't redraw while executing macros (good performance config)
set lazyredraw
" For regular expressions turn magic on
set magic
" Show matching brackets when text indicator is over them
set showmatch
" How many tenths of a second to blink when matching brackets
set mat=2
" No annoying sound on errors
set noerrorbells visualbell t_vb=
autocmd GUIEnter * set visualbell t_vb=
" Add extra margin to the left
set foldcolumn=0
" Show line numbers
set number
set relativenumber
" show command in bottom bar
set showcmd
" highlight current line
set cursorline
" Always show the status line
set laststatus=2
" Don't just delete the thing instantly when 'c<motion>'
set cpoptions+=$
" Make clipboard behave like a normal program
set clipboard=unnamed
" Show a highlighted column
set colorcolumn=80
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"" Key mappings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Use jk/kj to exit insert mode, use it like a single keystroke!
inoremap jk <Esc>
inoremap kj <ESC>
" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
let g:mapleader = ","
" Fast saving
nmap <leader>w :w<cr>
" Edit vimrc file
nmap <silent> <leader>ev :e $MYVIMRC<CR>
nmap <silent> <leader>sv :so $MYVIMRC<CR>
execute "nmap <silent> <leader>elv :e " . s:localvimrc . "<CR>"
execute "nmap <silent> <leader>slv :so " . s:localvimrc . "<CR>"
" Turn off highlight search markings
nmap <silent> <leader>n :nohls<CR>