-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.vim
92 lines (92 loc) · 2.85 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
set number
set guifont=DroidSansMono\ Nerd\ Font\ 13
set guifontwide=DroidSansMono\ Nerd\ Font\ 13
set hlsearch
set smartindent
set laststatus=2
set wildmenu
set ruler
set history=1000
set encoding=utf8
set expandtab
set tabstop=2
set shiftwidth=2
syntax enable
" PLUGIN SETTINGS
call plug#begin('~/.config/nvim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tpope/vim-commentary'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'preservim/nerdtree'
Plug 'ryanoasis/vim-devicons'
Plug 'tomasiser/vim-code-dark'
Plug 'akinsho/toggleterm.nvim', {'tag' : '*'}
call plug#end()
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction
" NERDTree SETTINGS
nmap <C-f> :NERDTreeToggle<CR>
let g:airline#extensions#tabline#enabled = 1
nmap <C-p> <Plug>AirlineSelectPrevTab
nmap <C-n> <Plug>AirlineSelectNextTab
" Airline SETTINGS
let g:airline_powerline_fonts = 1
let g:airline_theme = 'codedark'
let g:airline#extensions#tabline#fnamemod = ':t'
let g:airline#extensions#tabline#show_buffers = 1
let g:airline#extensions#tabline#show_splits = 0
let g:airline#extensions#tabline#show_tabs = 1
let g:airline#extensions#tabline#show_tab_nr = 0
let g:airline#extensions#tabline#show_tab_type = 1
let g:airline#extensions#tabline#show_close_button = 0
let g:airline#extensions#hunks#non_zero_only = 1
let g:airline#extensions#default#layout = [[ 'a', 'b', 'c' ], ['z']]
let g:airline_section_c = '%t %M'
let g:airline_section_z = get(g:, 'airline_linecolumn_prefix', '').'%3l:%-2v'
colorscheme codedark
" Esc SETTINGS
inoremap jk <Esc>
" /// Enable Netrw (default file browser)
" filetype plugin on
" /// Netrw SETTINGS
" let g:netwr_banner = 0
" let g:netrw_liststyle = 3
" let g:netrw_browse_split = 4
" let g:netrw_winsize = 30
" let g:netrw_sizestyle = "H"
" let g:netrw_timefmt = "%Y/%m/%d(%a) %H:%M:%S"
" let g:netrw_preview = 1
"/// SPLIT BORDER SETTINGS
hi VertSplit cterm=none
" ToggleTerm SETTINGS
lua require("toggleterm").setup()
inoremap <C-t> <ESC>:ToggleTerm<CR>
nnoremap <C-t> :ToggleTerm<CR>
" NORMAL SETTINGS
inoremap { {}<LEFT>
inoremap ( ()<LEFT>
inoremap [ []<LEFT>
inoremap " ""<LEFT>
inoremap ' ''<LEFT>
inoremap ` ``<LEFT>
inoremap <C-s> <ESC>:w<CR>i
nnoremap q :q<CR>
nnoremap w :w<CR>
nnoremap <C-s> :w<CR>
inoremap <silent><expr> <Tab> pumvisible() ? "\<C-n>" : <SID>check_back_space() ? "\<Tab>" :coc#refresh()
inoremap <expr> <ENTER> pumvisible() ? coc#_select_confirm() : "\<ENTER>"
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <S-A-f> <ESC>:call CocAction('format')<CR>i
nnoremap <S-A-f> :call CocAction('format')<CR>
nnoremap <C-LEFT> <C-w><Left>
nnoremap <C-RIGHT> <C-w><RIght>
nnoremap <C-Up> <C-w><Up>
nnoremap <C-Down> <C-w><Down>
inoremap <C-z> <ESC>ui
inoremap <C-y> <ESC>ri
nnoremap <C-z> u
nnoremap <C-y> r