2021-03-18 14:10:29 +01:00
|
|
|
set number
|
2020-11-07 16:40:23 +01:00
|
|
|
|
2021-06-11 13:56:40 +02:00
|
|
|
set tabstop=4 " The width of a TAB is set to 4.
|
|
|
|
" Still it is a \t. It is just that
|
|
|
|
" Vim will interpret it to be having
|
|
|
|
" a width of 4.
|
|
|
|
|
|
|
|
set shiftwidth=4 " Indents will have a width of 4
|
|
|
|
|
|
|
|
set softtabstop=4 " Sets the number of columns for a TAB
|
|
|
|
|
|
|
|
set expandtab " Expand TABs to spaces
|
|
|
|
|
2021-03-18 14:10:29 +01:00
|
|
|
" Plugins will be downloaded under the specified directory.
|
|
|
|
call plug#begin('~/.vim/plugged')
|
2020-11-07 16:40:23 +01:00
|
|
|
|
2021-03-18 14:10:29 +01:00
|
|
|
" Declare the list of plugins.
|
2020-11-07 16:40:23 +01:00
|
|
|
Plug 'tpope/vim-sensible'
|
2021-06-07 14:23:59 +02:00
|
|
|
Plug 'kaicataldo/material.vim', { 'branch': 'main' }
|
2021-03-18 14:10:29 +01:00
|
|
|
Plug 'ryanoasis/vim-devicons'
|
|
|
|
Plug 'preservim/nerdtree'
|
2021-06-11 13:56:40 +02:00
|
|
|
" A status line to the bottom
|
|
|
|
Plug 'itchyny/lightline.vim'
|
|
|
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
|
|
Plug 'evanleck/vim-svelte', {'branch': 'main'}
|
|
|
|
Plug 'ctrlpvim/ctrlp.vim'
|
|
|
|
Plug 'mattn/emmet-vim'
|
|
|
|
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' }
|
2020-11-07 16:40:23 +01:00
|
|
|
|
2021-03-18 14:10:29 +01:00
|
|
|
" List ends here. Plugins become visible to Vim after this call.
|
2020-11-07 16:40:23 +01:00
|
|
|
call plug#end()
|
|
|
|
|
2021-03-18 14:10:29 +01:00
|
|
|
" Or if you have Neovim >= 0.1.5
|
|
|
|
if (has("termguicolors"))
|
|
|
|
set termguicolors
|
|
|
|
endif
|
2020-11-07 16:40:23 +01:00
|
|
|
|
2021-06-11 13:56:40 +02:00
|
|
|
let g:svelte_preprocessors = ['typescript']
|
|
|
|
|
2021-03-18 14:10:29 +01:00
|
|
|
" Theme
|
|
|
|
syntax enable
|
2021-06-07 14:23:59 +02:00
|
|
|
let g:material_theme_style = 'ocean-community'
|
|
|
|
colorscheme material
|
2020-11-07 16:40:23 +01:00
|
|
|
|
2021-06-11 13:56:40 +02:00
|
|
|
let g:lightline = {
|
|
|
|
\ 'colorscheme': 'one',
|
|
|
|
\ 'background': 'dark',
|
|
|
|
\ }
|
|
|
|
|
2021-03-18 14:10:29 +01:00
|
|
|
let mapleader = ","
|
2021-06-11 13:56:40 +02:00
|
|
|
nmap <leader>rn <Plug>(coc-rename)
|
|
|
|
|
|
|
|
|
|
|
|
" COC Configs
|
|
|
|
set updatetime=300
|
2020-11-07 16:40:23 +01:00
|
|
|
|
2021-06-11 13:56:40 +02:00
|
|
|
" NerdTREE config
|
2021-03-18 14:10:29 +01:00
|
|
|
nmap <F6> :NERDTreeToggle<CR>
|
2021-06-11 13:56:40 +02:00
|
|
|
let NERDTreeShowHidden=1
|
|
|
|
au VimEnter * NERDTree
|
|
|
|
nmap <C-h> <C-w>h
|
|
|
|
nmap <C-j> <C-w>j
|
|
|
|
nmap <C-k> <C-w>k
|
|
|
|
nmap <C-l> <C-w>l
|
|
|
|
|
|
|
|
autocmd WinEnter * call s:CloseIfOnlyNerdTreeLeft()
|
|
|
|
|
|
|
|
" Close all open buffers on entering a window if the only
|
|
|
|
" buffer that's left is the NERDTree buffer
|
|
|
|
function! s:CloseIfOnlyNerdTreeLeft()
|
|
|
|
if exists("t:NERDTreeBufName")
|
|
|
|
if bufwinnr(t:NERDTreeBufName) != -1
|
|
|
|
if winnr("$") == 1
|
|
|
|
q
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endfunction
|
2020-11-07 16:40:23 +01:00
|
|
|
|
2021-03-18 14:10:29 +01:00
|
|
|
let g:python3_host_prog = expand('~/.pyenv/shims/python3.9')
|