From 74b584835fa454c6d07d7fad813735ccbbb2754a Mon Sep 17 00:00:00 2001 From: Warrick Lo Date: Sat, 27 Nov 2021 04:51:20 -0800 Subject: Add Vim and Neovim configs --- .config/nvim/init.vim | 40 ++++++++++++++++++++++++++++++++++++++++ .vimrc | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 .config/nvim/init.vim create mode 100644 .vimrc diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim new file mode 100644 index 0000000..93d9bd5 --- /dev/null +++ b/.config/nvim/init.vim @@ -0,0 +1,40 @@ +" Neovim configuration + +" General + +set nocompatible +filetype plugin on +filetype indent on +syntax on +set encoding=utf-8 +set splitbelow splitright +set wrap +set wildmode=longest,list,full +set lazyredraw +set ignorecase +set mouse=a +set guioptions=a +set nobackup nowritebackup +set list listchars=eol:¬,tab:»\ ,trail:∙,extends:›,precedes:‹ + +" Tabs + +set noexpandtab +set cindent +set softtabstop=0 +set tabstop=8 +set shiftwidth=8 + +" Line numbers + +set number + +" Comments + +" Do not comment on newline. +autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o + +" Miscellaneous + +" Have :Q behave like :q. +command! Q :q diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..469e89d --- /dev/null +++ b/.vimrc @@ -0,0 +1,40 @@ +" Vim configuration + +" General + +set nocompatible +filetype plugin on +filetype indent on +syntax on +set encoding=utf-8 +set splitbelow splitright +set wrap +set wildmode=longest,list,full +set lazyredraw +set ignorecase +set mouse=a +set guioptions=a +set nobackup nowritebackup +set list listchars=eol:¬,tab:»\ ,trail:∙,extends:›,precedes:‹ + +" Tabs + +set noexpandtab +set cindent +set softtabstop=0 +set tabstop=8 +set shiftwidth=8 + +" Line numbers + +set number + +" Comments + +" Do not comment on newline. +autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o + +" Miscellaneous + +" Have :Q behave like :q. +command! Q :q -- cgit v1.2.3