-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.vim
109 lines (94 loc) · 2.41 KB
/
init.vim
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
"vim: set ft=vimrc:
" Plugins
source ~/.config/nvim/plugins.vim
" General settings
filetype plugin indent on
set smarttab
set mouse=a
set backspace=2
set backupdir=~/.vimbackup
set wildmode=longest:list
set nowildmenu
set nomore
set modeline
set modelines=5
set hlsearch
set colorcolumn=+1
set list
set nojoinspaces
set formatoptions=tcqjro
set ignorecase
set smartcase
set splitbelow
set splitright
" Appearance
syntax on
let g:jellybeans_overrides = {
\ 'background': { 'ctermbg': 'none', '256ctermbg': 'none' },
\}
colorscheme jellybeans
let g:airline_theme='dark'
set nu
set ls=2
set showcmd
set cursorline
set lazyredraw
" Key mapping
let mapleader=","
map ö gcc
map Ö v: StripWhitespace<cr>
map ä "+
map Ä "0
map C :w<cr>,ll
cmap <S-Tab> <C-N>
cmap <Esc><S-Tab> <C-P>
map <C-l> :tabnext<cr>
map <C-h> :tabprevious<cr>
map <C-q> :quit!<cr>
map <m-h> <C-W>h
map <m-l> <C-W>l
map <m-j> <C-W>j
map <m-k> <C-W>k
nnoremap x :Lnext<cr>
nnoremap X :Lprevious<cr>
map - <Plug>(expand_region_shrink)
let g:SuperTabMappingTabLiteral = "<m-tab>"
" custom commands
command XmlFormat :%! xmllint --format -
command JsonFormat :%! jq .
function SwitchPylint()
if (g:ale_python_pylint_executable=="pylint")
let g:ale_python_pylint_executable="pylint-3"
else
let g:ale_python_pylint_executable="pylint"
endif
endfunction
command SwitchPylint :call SwitchPylint()
" Fuzzy search ignored files
set wildignore+=*.pyc,*/build/lib/*,**/tmp/*,*.so,*.swp,*.zip,**/bower_components/*,**/node_modules/*
" vim-indent-guides: Enable indent quide on startup
let g:indent_guides_enable_on_vim_startup = 1
" vim-airline: Use powerline fonts
let g:airline_powerline_fonts = 1
" https://github.com/neovim/neovim/pull/7985
autocmd VimResized * redraw!
" completion
let g:SuperTabDefaultCompletionType = "context"
let g:deoplete#enable_at_startup = 1
set completeopt-=preview
" smarter filename completion
inoremap <c-x><c-f><cmd>set isf-==<cr><c-x><c-f><cmd>set isf+==<cr>
" neovim in virtualenv
let g:python_host_prog = '/usr/bin/python'
let g:python3_host_prog = '/usr/bin/python3'
" Ternjs
let g:deoplete#sources#ternjs#tern_bin = 'ternjs'
let g:deoplete#sources#ternjs#filetypes = ['vue']
" fix 'Request from non-main thread.' error
call deoplete#custom#option('num_processes', 4)
" vim-markdown
let g:vim_markdown_folding_disabled = 1
" Riv
let g:riv_fold_auto_update = 0
" Pylint
let g:ale_python_pylint_options = '--rcfile ~/.pylintrc'