Last active
September 4, 2018 19:46
-
-
Save leobrines/94b614e5bbbf43754143a910120b3b7f to your computer and use it in GitHub Desktop.
Vim Config | KISS Principle
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
" ------ Basic Commands ----------- | |
set history=500 | |
set nocompatible | |
set encoding=utf-8 | |
set omnifunc=syntaxcomplete#Complete | |
set autoread | |
au BufReadPost *.pug set syntax=javascript | |
filetype plugin on | |
filetype indent on | |
" ------ Indentation ----------- | |
set noexpandtab | |
set copyindent | |
set preserveindent | |
set softtabstop=0 | |
set shiftwidth=3 | |
set tabstop=3 | |
set smartindent | |
set smarttab | |
set autoindent | |
" ------ VIM UI ----------- | |
set wrap | |
"set number | |
set showmode | |
set showmatch | |
set cursorline | |
set ruler | |
set laststatus=2 | |
set statusline+=%#warningmsg# | |
set wildmenu | |
set wildmode=list:longest,full " Command <Tab> completion, list matches, then longest common part, then all. | |
let g:elite_mode=1 | |
"set list | |
"set listchars=tab:··,trail:· | |
" ------ Searching ----------- | |
set ignorecase | |
set smartcase | |
set hlsearch | |
set incsearch | |
" ------ Syntax ----------- | |
syntax enable | |
set t_Co=256 | |
set background=dark | |
" ------ Plugin Auto Completation Popup (Optional) ----------- | |
"set completeopt+=menuone,noselect,noinsert | |
"autocmd CompleteDone * pclose | |
"autocmd InsertCharPre * call OpenCompletion() | |
"function! OpenCompletion() | |
" if !pumvisible() && ((v:char >= 'a' && v:char <= 'z') || (v:char >= 'A' && v:char <= 'Z')) | |
" call feedkeys("\<C-x>\<C-o>", "n") | |
" endif | |
"endfunction | |
" ------ Autoinstall VIM-PLUG | A minimalist Vim plugin manager ----------- | |
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 | |
" ------ The Best Plugins For Me ----------- | |
call plug#begin('~/.vim/plugged') | |
Plug 'ervandew/supertab' | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'pangloss/vim-javascript' | |
Plug 'mattn/emmet-vim' | |
call plug#end() | |
" ------ GOOD JOB! ----------- | |
" Now, open vim and VIM-PLUG will install all for you. If not, execute :PluginInstall | |
" Ready! Go develop amazing things |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment