-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.vim
More file actions
113 lines (90 loc) · 2.38 KB
/
init.vim
File metadata and controls
113 lines (90 loc) · 2.38 KB
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
110
111
112
" Options
set background=dark
set clipboard=unnamedplus
set completeopt=noinsert,menuone,noselect
set cursorline
set hidden
set inccommand=split
set mouse=a
set number
set relativenumber
set splitbelow splitright
set title
set ttimeoutlen=0
set wildmenu
" Tabs size
set expandtab
set shiftwidth=2
set tabstop=2
filetype plugin indent on
syntax on
set t_Co=256
" True color if available
let term_program=$TERM_PROGRAM
" Check for conflicts with Apple Terminal app
if term_program !=? 'Apple_Terminal'
set termguicolors
else
if $TERM !=? 'xterm-256color'
set termguicolors
endif
endif
" Italics
let &t_ZH="\e[3m"
let &t_ZR="\e[23m"
call plug#begin()
" Appearance
Plug 'vim-airline/vim-airline'
Plug 'ryanoasis/vim-devicons'
Plug 'elvessousa/sobrio'
" Utilities
Plug 'sheerun/vim-polyglot'
Plug 'jiangmiao/auto-pairs'
Plug 'ap/vim-css-color'
Plug 'preservim/nerdtree'
" Completion / linters / formatters
Plug 'neoclide/coc.nvim', {'branch': 'master', 'do': 'yarn install'}
Plug 'plasticboy/vim-markdown'
" Git
Plug 'airblade/vim-gitgutter'
call plug#end()
colorscheme sobrio
let g:airline_theme='sobrio'
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
" File browser
let NERDTreeShowHidden=1
" Enable file search
let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard']
" Disable math tex conceal feature
let g:tex_conceal = ''
let g:vim_markdown_math = 1
" Markdown
let g:vim_markdown_folding_disabled = 1
let g:vim_markdown_frontmatter = 1
let g:vim_markdown_conceal = 0
let g:vim_markdown_fenced_languages = ['tsx=typescriptreact']
" Language server stuff
command! -nargs=0 Prettier :call CocAction('runCommand', 'prettier.formatFile')
"
"Ctrl+q: closes the open screen.
" F4: closes the open file.
" F5: shows or hides NERDTree.
" F6: opens a terminal in a lower split window.
" Shift+Tab: switch to the previous tab.
" Shift+t: creates a tab.
" Tab: switch to the next open tab.
" Normal mode remappings
"nnoremap <C-q> :q!<CR>
"nnoremap <F4> :bd<CR>
nnoremap <F5> :NERDTreeToggle<CR>
"nnoremap <F6> :sp<CR>:terminal<CR>
" Tabs
"nnoremap <S-Tab> gT
"nnoremap <Tab> gt
" Auto Commands
augroup auto_commands
autocmd BufWrite *.py call CocAction('format')
autocmd BufWrite *.go call CocAction('format')
autocmd FileType scss setlocal iskeyword+=@-@
augroup END