Created
January 29, 2019 21:16
-
-
Save mr4torr/86db15ab6a980d75df7ab10bcb853b17 to your computer and use it in GitHub Desktop.
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
" Specify a directory for plugins | |
" - For Neovim: ~/.local/share/nvim/plugged | |
" - Avoid using standard Vim directory names like 'plugin' | |
call plug#begin('~/.vim/plugged') | |
Plug 'ryanoasis/vim-devicons' | |
" Make sure you use single quotes | |
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align | |
Plug 'junegunn/vim-easy-align' | |
" Any valid git URL is allowed | |
" Plug 'https://github.com/junegunn/vim-github-dashboard.git' | |
" Multiple Plug commands can be written in a single line using | separators | |
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' | |
" On-demand loading | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
" Plug 'tpope/vim-fireplace', { 'for': 'clojure' } | |
" Using a non-master branch | |
" Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' } | |
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above) | |
Plug 'fatih/vim-go', { 'tag': '*' } | |
" Plugin options | |
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' } | |
" Project Navigation {{{3 | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'mhinz/vim-grepper' | |
Plug 'vim-scripts/ctags.vim' " ctags related stuff | |
Plug 'majutsushi/tagbar' | |
Plug 'rbgrouleff/bclose.vim' " Required by ranger.vim | |
Plug 'francoiscabrol/ranger.vim' | |
Plug 'haya14busa/incsearch.vim' " Better search highlighting | |
" Unmanaged plugin (manually installed and updated) | |
" Plug '~/my-prototype-plugin' | |
Plug 'Valloric/YouCompleteMe' | |
Plug 'ervandew/supertab' | |
Plug 'ternjs/tern_for_vim' | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'kien/ctrlp.vim' | |
" THEMES | |
Plug 'nightsense/cosmic_latte' | |
Plug 'chriskempson/base16-vim' | |
Plug 'w0ng/vim-hybrid' | |
Plug 'trevordmiller/nova-vim' | |
Plug 'mhartington/oceanic-next' | |
Plug 'arcticicestudio/nord-vim', { 'on': 'NERDTreeToggle' } | |
Plug 'jiangmiao/auto-pairs' | |
Plug 'airblade/vim-gitgutter' | |
Plug 'tpope/vim-surround' " Change word surroundings | |
Plug 'tpope/vim-commentary' " Comments stuff | |
Plug 'tpope/vim-repeat' | |
Plug 'tpope/vim-endwise' | |
Plug 'tpope/vim-fugitive' | |
Plug 'cdata/vim-tagged-template' | |
Plug 'vim-airline/vim-airline' | |
Plug 'retorillo/airline-tablemode.vim' | |
Plug 'othree/yajs.vim' | |
Plug 'HerringtonDarkholme/yats.vim' | |
" Syntax - Javascript | |
Plug 'pangloss/vim-javascript' | |
Plug 'mxw/vim-jsx' | |
Plug 'rhysd/npm-debug-log.vim' | |
Plug 'cdata/vim-tagged-template' | |
" Syntax -JSON | |
Plug 'leshill/vim-json' | |
" Syntax - TypeScript | |
Plug 'HerringtonDarkholme/yats.vim' | |
Plug 'mhartington/nvim-typescript', { 'do': ':UpdateRemotePlugins' } | |
" Syntax - HTML | |
Plug 'othree/html5.vim' | |
Plug 'mattn/emmet-vim' | |
" Syntax - CSS | |
Plug 'hail2u/vim-css3-syntax', { 'for': 'css' } | |
" Syntax - Sass | |
Plug 'cakebaker/scss-syntax.vim' | |
" Syntax - Ruby | |
Plug 'vim-ruby/vim-ruby', { 'for': 'ruby' } | |
Plug 'tpope/vim-rails' | |
" Syntax - Ruby | |
Plug 'digitaltoad/vim-pug' | |
"" Initialize plugin system | |
call plug#end() | |
set number | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => General | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Sets how many lines of history VIM has to remember | |
set history=500 | |
" Enable filetype plugins | |
filetype plugin on | |
filetype indent on | |
" Set to auto read when a file is changed from the outside | |
set autoread | |
" With a map leader it's possible to do extra key combinations | |
" like <leader>w saves the current file | |
let mapleader = "," | |
" Fast saving | |
nmap <leader>w :w!<cr> | |
" :W sudo saves the file | |
" (useful for handling the permission-denied error) | |
command W w !sudo tee % > /dev/null | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => VIM user interface | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Set 7 lines to the cursor - when moving vertically using j/k | |
set so=7 | |
" Avoid garbled characters in Chinese language windows OS | |
let $LANG='en' | |
set langmenu=en | |
" source $VIMRUNTIME/delmenu.vim | |
" source $VIMRUNTIME/menu.vim | |
" Turn on the Wild menu | |
set wildmenu | |
" Ignore compiled files | |
set wildignore=*.o,*~,*.pyc | |
if has("win16") || has("win32") | |
set wildignore+=.git\*,.hg\*,.svn\* | |
else | |
set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store | |
endif | |
set wildignore+=*\\node_modules\\* | |
"Always show current position | |
set ruler | |
" Height of the command bar | |
set cmdheight=1 | |
" A buffer becomes hidden when it is abandoned | |
set hid | |
" Configure backspace so it acts as it should act | |
set backspace=eol,start,indent | |
set whichwrap+=<,>,h,l | |
" Ignore case when searching | |
set ignorecase | |
" When searching try to be smart about cases | |
set smartcase | |
" Highlight search results | |
set hlsearch | |
" Makes search act like search in modern browsers | |
set incsearch | |
" Don't redraw while executing macros (good performance config) | |
set lazyredraw | |
" For regular expressions turn magic on | |
set magic | |
" Show matching brackets when text indicator is over them | |
set showmatch | |
" How many tenths of a second to blink when matching brackets | |
set mat=2 | |
" No annoying sound on errors | |
set noerrorbells | |
set novisualbell | |
set t_vb= | |
set tm=500 | |
" Properly disable sound on errors on MacVim | |
if has("gui_macvim") | |
autocmd GUIEnter * set vb t_vb= | |
endif | |
" Add a bit extra margin to the left | |
set foldcolumn=1 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Colors and Fonts | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Enable syntax highlighting | |
syntax enable | |
" Enable 256 colors palette in Gnome Terminal | |
set t_Co=256 | |
" for vim 8 | |
" | |
set background=dark | |
if has("termguicolors") " set true color | |
let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum" | |
let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum" | |
set termguicolors | |
endif | |
" Set extra options when running in GUI mode | |
if has("gui_running") | |
set guioptions-=T | |
set guioptions-=e | |
set t_Co=256 | |
set guitablabel=%M\ %t | |
endif | |
let base16colorspace=256 " Access colors present in 256 colorspace | |
" Set utf8 as standard encoding and en_US as the standard language | |
set encoding=utf8 | |
"try | |
" colorscheme cosmic_latte | |
" colorscheme base16-default-dark | |
" colorscheme hybrid | |
" colorscheme nova | |
"colorscheme OceanicNext | |
colorscheme nord | |
" let g:hybrid_custom_term_colors = 1 | |
" let g:hybrid_reduced_contrast = 1 " Remove this line if using the default palette. | |
let $NVIM_TUI_ENABLE_TRUE_COLOR=1 | |
"let g:airline_theme='oceanicnext' | |
let g:airline_theme='nord' | |
"let g:airline_theme='cosmic_latte_dark' | |
let g:oceanic_next_terminal_bold = 1 | |
let g:oceanic_next_terminal_italic = 1 | |
"catch | |
"endtry | |
" Use Unix as the standard file type | |
set ffs=unix,dos,mac | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Files, backups and undo | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Turn backup off, since most stuff is in SVN, git et.c anyway... | |
set nobackup | |
set nowb | |
set noswapfile | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Text, tab and indent related | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Use spaces instead of tabs | |
set expandtab | |
" Be smart when using tabs ;) | |
set smarttab | |
" 1 tab == 4 spaces | |
set shiftwidth=4 | |
set tabstop=4 | |
" Linebreak on 500 characters | |
set lbr | |
set tw=500 | |
set ai "Auto indent | |
set si "Smart indent | |
set wrap "Wrap lines | |
set cursorline | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Plugin - YCM config | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Start autocompletion after 4 chars | |
let g:ycm_min_num_of_chars_for_completion = 4 | |
let g:ycm_min_num_identifier_candidate_chars = 4 | |
let g:ycm_enable_diagnostic_highlighting = 0 | |
" Don't show YCM's preview window [ I find it really annoying ] | |
set completeopt-=preview | |
let g:ycm_add_preview_to_completeopt = 0 | |
" | |
" | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Plugin Syntax Javascript | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
let g:jsx_ext_required = 1 | |
let g:jsx_pragma_required = 1 | |
let g:javascript_plugin_jsdoc = 1 | |
let g:javascript_plugin_ngdoc = 1 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Plugin Vim-airline | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
let g:airline_powerline_fonts = 1 " Enable the patched Powerline fonts | |
let g:nord_italic_comments = 1 | |
let g:nord_comment_brightness = 12 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Plugin CtrlP | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"let g:ctrlp_max_files=0 | |
let g:ctrlp_working_path_mode = 'ra' | |
let g:ctrlp_switch_buffer = 'Et' | |
let g:ctrlp_custom_ignore = { 'dir': 'node_modules' } | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Plugin vim-jsx | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
let g:jsx_ext_required = 0 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"} => MAP | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
map <C-b> :NERDTreeToggle<CR> | |
:nnoremap <Leader>q" ciw""<Esc>P | |
:nnoremap <Leader>q' ciw''<Esc>P |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment