-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathideavimrc
76 lines (65 loc) · 1.8 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
set commentary
set multiple-cursors
set surround
set title
set number
set showcmd showmatch noshowmode
set lazyredraw
set hidden
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
set incsearch hlsearch
set smartcase
set magic lbr
set nobackup nowb
set autoindent smartindent cindent
set wildmenu
set foldlevel=3
set formatoptions+=mM
set fileformat=unix
set fileformats=unix,dos
set list tabstop=4 softtabstop=4 shiftwidth=4 expandtab
set vb t_vb=
set background=dark
set history=400 " vim default save 20 histories
set autoread " when file is modified outside vim, auto reload
set mouse=
set encoding=utf8
set fileencodings=utf8,gb2312,gb18030,latin1,utf-16le,utf-16be,iso-8859,ucs-bom
set listchars=trail:.,tab:▸\ ,eol:¬
set completeopt=longest,menuone,preview
set laststatus=2 " show status line
set cursorcolumn
set cursorline
set clipboard=unnamed
""""""""""""""
"" Mappings ""
""""""""""""""
set pastetoggle=<F12>
" Set leader to ;
" Note: This line MUST come before any <leader> mappings
let mapleader=';'
let maplocalleader = ';'
nmap <C-b> :action GotoDeclaration<CR>
nmap <C-n> :action GotoClass<CR>
nmap <C-p> :action GotoFile<CR>
map <C-k> :action ChanesView.ToggleCommentUi<CR>
nmap <C-o> :action Back<CR>
nmap <C-i> :action Forward<CR>
nmap <leader>t <ESC>:action Refactorings.QuickListPopupAction<CR>
nmap gq <ESC>:action ReformatCode<CR>
nmap = <ESC>:action AutoIndentLines<CR>
" refresh
noremap \r <ESC>:source ~/.ideavimrc<CR>
" tab move
nmap K <ESC>:action NextTab<CR>
nmap J <ESC>:action PreviousTab<CR>
nmap VV ggVG
map <C-c> "+y
" YouCompleteMe
nmap <leader>m :action FileStructurePopup<CR>
nmap <leader>u :action FindUsages<CR>
nmap <leader>d :action QuickJavaDoc<CR>
nmap <leader>f :action QuickImplementations<CR>
nmap <leader>g :action GotoDeclaration<CR>
nmap <leader>r :action RenameElement<CR>