Last active
July 24, 2019 15:07
-
-
Save lightscalar/4e4706ceb2ba8a00e3430c5edfd793fa to your computer and use it in GitHub Desktop.
Latest .vimrc
This file contains 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
" Here are the basics. | |
map Q <Nop> | |
if has('python3') | |
silent! python3 1 | |
endif | |
imap jk <ESC> | |
" nnoremap <Leader>w <ESC>:w<CR> | |
set number | |
set relativenumber | |
set shell=bash\ -l " vim shell should behave like my usual shell. | |
map <Leader>] :noh <CR> | |
map <Leader>[ :StripWhitespace <CR> | |
map <Space>w :w <CR> | |
set noswapfile | |
set visualbell | |
set t_vb= | |
nnoremap <Leader>w gqip | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
" Set persistent undo | |
set undofile " turn on persistent undo | |
set undodir=~/.vim/undodir | |
" Better window navigation! Use the arrow keys! | |
nnoremap <C-J> <C-W><C-J> | |
nnoremap <C-K> <C-W><C-K> | |
nnoremap <C-L> <C-W><C-L> | |
nnoremap <C-H> <C-W><C-H> | |
" Quickly list and navigate buffers. | |
nnoremap gp :bp<CR> | |
nnoremap gn :bn<CR> | |
nnoremap gl :ls<CR> | |
" How are we going to color the position of the cursor, current line, etc. | |
let &colorcolumn=join(range(100,100),",") | |
highlight ColorColumn ctermbg=254 guibg=#efefef | |
highlight LineNr ctermbg=252 | |
set cursorline | |
hi CursorLine term=bold cterm=bold ctermbg=255 | |
syntax enable | |
" Specify a directory for plugins. | |
call plug#begin('~/.vim/plugged') | |
Plug 'tpope/vim-commentary' | |
Plug 'tpope/vim-surround' | |
Plug 'ervandew/supertab' | |
Plug 'tpope/vim-vinegar' | |
Plug 'SirVer/ultisnips' | |
Plug 'itchyny/lightline.vim' | |
" Plug 'vim-airline/vim-airline' | |
" Plug 'vim-airline/vim-airline-themes' | |
Plug 'ntpeters/vim-better-whitespace' | |
Plug 'godlygeek/tabular' | |
Plug 'plasticboy/vim-markdown' | |
Plug 'christoomey/vim-tmux-navigator' | |
Plug 'posva/vim-vue' | |
Plug 'blueyed/vim-diminactive' | |
Plug 'danilo-augusto/vim-afterglow' | |
" Plug 'rakr/vim-two-firewatch' | |
Plug 'gregsexton/Atom' | |
Plug 'avakhov/vim-yaml' | |
Plug 'dikiaap/minimalist' | |
Plug 'ambv/black' | |
Plug 'drewtempelmeyer/palenight.vim' | |
Plug 'prettier/vim-prettier', { | |
\ 'do': 'npm install', | |
\ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue'] } | |
call plug#end() | |
set background=dark | |
colorscheme palenight | |
let g:lightline = {'colorscheme' : 'palenight'} | |
" Highlight trailing whitespace in our files. | |
highlight ExtraWhitespace ctermbg=128 | |
" Set UltiSnip directories. | |
let g:UltiSnipsSnippetDirectories = ['~/.vim/UltiSnips', 'UltiSnips'] | |
let g:UltiSnipsExpandTrigger= "<Leader><Leader>" | |
" let g:markdown_fenced_languages = ['markdown=md'] | |
filetype plugin indent on | |
filetype plugin on | |
set laststatus=2 | |
set ttimeoutlen=50 | |
autocmd FileType html setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType javascript setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType vue setlocal shiftwidth=2 tabstop=2 | |
autocmd FileType vue syntax sync fromstart | |
let g:diminactive_use_colorcolumn = 1 | |
" let g:closetag_filenames = "*.html,*.xhtml,*.phtml,*.vue" | |
" | |
set backspace=indent,eol,start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment