blob: b5101077ac54037f38e112f560f9e9c8bcdeda42 (
plain)
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
|
set nu
set ff=unix
set colorcolumn=80
"let g:python3_host_prog='D:/Progams/Python/python.exe'
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'scrooloose/nerdcommenter'
Plug 'godlygeek/tabular'
Plug 'xuyuanp/nerdtree-git-plugin'
Plug 'tpope/vim-fugitive'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'Shougo/denite.nvim'
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'Shougo/echodoc.vim'
Plug 'xolox/vim-misc'
Plug 'xolox/vim-lua-ftplugin'
Plug 'VaiN474/vim-etlua'
Plug 'leafo/moonscript-vim'
Plug 'teal-language/vim-teal'
Plug 'whonore/Coqtail'
"Plug 'joshdick/onedark.vim'
Plug 'cocopon/iceberg.vim'
call plug#end()
colorscheme iceberg
"deoplete
let g:deoplete#enable_at_startup = 1
inoremap <expr><tab> pumvisible() ? "\<c-n>" : "\<tab>"
"lua
let g:lua_compiler_name='luajit'
"let g:lua_compiler_name='lua'
let g:lua_complete_dynamic=1
au BufReadPost *.busted set syntax=lua
au BufReadPost *.spec set syntax=lua
au BufReadPost *.etlua set syntax=html
let g:echodoc#enable_at_startup=1
"NERDTree config
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
\ quit | endif
nnoremap <C-\> :NERDTreeToggle<Cr>
nnoremap <C-r> :NERDTreeFind<Cr>
let NERDTreeMapHelp='y'
let NERDTreeMapJumpLastChild='y'
let NERDTreeMapJumpFirstChild='y'
"Fuzzy file search
let g:fzf_layout = { 'window': {'width': 0.9, 'height': 0.6} }
noremap <A-p> :call fzf#run(fzf#wrap({'sink': 'tabe', 'left': '20%', 'source': 'git ls-files'}))<Cr>
noremap <C-p> :call fzf#run(fzf#wrap({'sink': 'vsplit', 'left': '50%', 'source': 'git ls-files'}))<Cr>
"ctrl+s saves
nmap <C-s> :w<Cr>
"For some reason this is different between linux and windows
if has('win32')
vmap <C-/> <leader>c<Space>
else
vmap <C-_> <leader>c<Space>
endif
"Move around quickly
nnoremap J 5j
nnoremap K 5k
nnoremap H 5h
nnoremap L 5l
"Navigate splits
tnoremap <A-h> <C-\><C-n><C-w>h
tnoremap <A-j> <C-\><C-n><C-w>j
tnoremap <A-k> <C-\><C-n><C-w>k
tnoremap <A-l> <C-\><C-n><C-w>l
nnoremap <A-h> <C-\><C-n><C-w>h
nnoremap <A-j> <C-\><C-n><C-w>j
nnoremap <A-k> <C-\><C-n><C-w>k
nnoremap <A-l> <C-\><C-n><C-w>l
"Resize splits
noremap <C-h> :vertical resize -5<Cr>
noremap <C-l> :vertical resize +5<Cr>
noremap <C-j> :res +5<Cr>
noremap <C-k> :res -5<Cr>
"Navigate tabs
noremap <A-]> gt
noremap <A-[> gT
"Add a semicolon at the nd of the line
vnoremap <C-;> :s/\([^;]\)$/\1;/g<Cr>
"Build in a vertical split
noremap <C-b> :vsplit<CR>:terminal make<CR>
filetype plugin indent on
syntax enable
|