dotfiles/m/vim/.vimrc

97 lines
2.3 KiB
VimL
Raw Normal View History

2022-08-24 08:07:33 +00:00
" Make backspace behave in a sane manner.
set backspace=indent,eol,start
" Spaces indentation
set expandtab
set tabstop=2
" set softtabstop=2
set shiftwidth=2
" Consider installing the Smart Tabs plugin
" Show whitespace
set listchars=eol,tab:>-,trail:~,extends:>,precedes:<,space
" Show line numbers
set number
set relativenumber
" Default: split right
set splitright
" Allow hidden buffers, don't limit to one file per window/split
set hidden
" Sane vim split naviagation (via Gaslight blog)
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
nnoremap <c-h> <c-w>h
nnoremap <c-l> <c-w>l
" Disable filetype detection
filetype off
" vim-plug
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'edkolev/tmuxline.vim'
Plug 'christoomey/vim-tmux-navigator'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'dense-analysis/ale'
Plug 'Valloric/YouCompleteMe'
Plug 'pangloss/vim-javascript'
Plug 'MaxMEllon/vim-jsx-pretty'
Plug 'leafgarland/typescript-vim'
Plug 'HerringtonDarkholme/yats.vim'
Plug 'Quramy/tsuquyomi'
Plug 'rust-lang/rust.vim'
Plug 'severij/vadelma'
Plug 'tpope/vim-surround'
call plug#end()
" NERDTree on ctrl+n
let NERDTreeShowHidden=1
map <silent> <C-n> :NERDTreeToggle<CR>
" close NERDTree after opening a file
" let g:NERDTreeQuitOnOpen=1
" Tsuquyomi
autocmd Filetype typescript nmap <buffer> <Leader>t : <C-u>echo tsuquyomi#hint()<CR>
" Airline
let g:airline_powerline_fonts = 1
let g:airline_theme = 'light'
" Tmuxline
let g:tmuxline_theme = 'airline_visual'
" YouCompleteMe <> TypeScript
if !exists("g:ycm_semantic_triggers")
let g:ycm_semantic_triggers = {}
endif
let g:ycm_semantic_triggers['typescript'] = ['.']
" Enable file type detection and do language-dependent indenting
filetype plugin indent on
" Switch syntax highlighting on
syntax enable
" Set color scheme
set background=light
colorscheme vadelma
" Temporary file locations
set backupdir=.backup/,~/.backup/,/tmp//
set directory=.swp/,~/.swp/,/tmp//
set undodir=.undo/,~/.undo/,/tmp//