-
Notifications
You must be signed in to change notification settings - Fork 24
/
.ideavimrc
84 lines (65 loc) · 1.52 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
" Leader key as Space bar
let mapleader = ' '
nnoremap <Leader>w :w<CR>
nnoremap <Leader>q :x<CR>
" Remove highlight for pattern match
nnoremap <Leader>n :noh<CR>
" Switch between split windows
" Leader + h/j/k/l
noremap <Leader>h <c-w>h
noremap <Leader>j <c-w>j
noremap <Leader>k <c-w>k
noremap <Leader>l <c-w>l
" VCS next/prev change
noremap <Leader>J :action VcsShowNextChangeMarker<CR>
noremap <Leader>K :action VcsShowPrevChangeMarker<CR>
" VCS annotate
noremap <Leader>a :action Annotate<CR>
" Scroll horizontally
" Leader + H/L
noremap <Leader>H :action ScrollPane-scrollLeft<CR>
noremap <Leader>L :action ScrollPane-scrollRight<CR>
" Switch between tabs (Hammerspoon?)
" Leader + t/T
nnoremap <Leader>t gt
nnoremap <Leader>p gT
" Toogle Project (tree) panel
nnoremap <Leader>f :action SelectIn<CR>
" Toggle Soft Wraps
nnoremap <Leader>s :action EditorToggleUseSoftWraps<CR>
" Keep visual mode when setting indent
vnoremap < <gv
vnoremap > >gv
" To enable copy from system
set clipboard=unnamed
set clipboard+=ideaput
set encoding=utf8
" Required!
set nocompatible
filetype on
syntax enable
syntax on
set hlsearch
set wrapscan
set tabstop=2
set shiftwidth=2
set expandtab
set showcmd
set showmatch
set ff=unix
set ideamarks
" Use existing tab or open newtab
:set switchbuf+=usetab,newtab
" Set relative number
set rnu
" Highlight current cursor line
set cursorline
" Set global ignore
set wildignore+=./node_modules/**,./build
" Fold method
set foldmethod=syntax
set nofoldenable
" Set Plugin
set surround
set easymotion
set ideajoin