Last active
August 19, 2022 01:41
-
-
Save helloworld12321/8460af45ba9255cd762e5b2c40a788cf to your computer and use it in GitHub Desktop.
RC files for Vim and Neovim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" === Basic functionality === | |
syntax on | |
set number | |
set colorcolumn=81 | |
set expandtab | |
set shiftwidth=2 | |
set splitright | |
set splitbelow | |
" Remove trailing whitespace | |
autocmd BufWritePre * %s/\s\+$//e | |
" Workaround for https://github.com/vim/vim/issues/7280 | |
set regexpengine=0 | |
" === Aesthetics === | |
" (255 is a very light grey; 75 is a steel blue.) | |
highlight ColorColumn ctermbg=255 | |
highlight LineNr ctermfg=75 | |
" === Plugins === | |
" (Other configuration files can customize this section by setting certain | |
" global variables.) | |
if exists('g:pluggedDirectory') | |
call plug#begin(g:pluggedDirectory) | |
else | |
call plug#begin('~/.vim/plugged') | |
endif | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'leafgarland/typescript-vim' | |
Plug 'sersorrel/vim-lilypond' | |
Plug 'Vimjas/vim-python-pep8-indent' | |
Plug 'tpope/vim-sensible' | |
" Allow other configuration files to source this one and add extra plugins. | |
if exists('g:extendedPlugins') | |
for plugin in g:extendedPlugins | |
Plug plugin | |
endfor | |
endif | |
call plug#end() | |
" The vim-sensible plugin sets the hlsearch option, which I don't actually | |
" like. | |
set nohlsearch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let g:pluggedDirectory = '~/.local/share/nvim/plugged' | |
let g:extendedPlugins = ['floobits/floobits-neovim'] | |
source ~/.vimrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment