Created
December 6, 2017 17:03
-
-
Save joiggama/fab3018f1a020e30e90e89276d558232 to your computer and use it in GitHub Desktop.
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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" ~/.vimrc | |
" | |
" Dependencies: | |
" | |
" - fzf | |
" - neovim editor | |
" - python-3's neovim package | |
" - rbenv | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Config - Font | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Config - Clipboard | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set clipboard=unnamed " Use system clipboard | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Config - Files | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set modelines=0 " Enable modelines | |
set nobackup " Disable backup | |
set noswapfile " Disable swap | |
set nowritebackup " Disable backup | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Config - Indentation | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
filetype plugin indent on " Enable file type based indentation | |
set expandtab " Expand tabs to spaces | |
set shiftwidth=2 " Set number of spaces for shift/auto indentation | |
set tabstop=2 " Set Number of spaces for tab expansion | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Config - Search | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set hlsearch " Enable result hightlighting | |
set ignorecase " Ignore case | |
set smartcase " Mind uppercase characters in the given pattern | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Config - UI/UX | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set nofoldenable " Disable folding | |
set nowrap " Disable line wrapping | |
set number " Display line numbersset | |
set synmaxcol=120 " Cap syntax highlighting to 120 columns | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Mapping - Meta | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
map <leader>ve :edit ~/.vimrc<cr> | |
map <leader>vs :source ~/.vimrc<cr> | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Mapping - junegunn/vim-plug | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
map <leader>pi :source ~/.vimrc <bar> :PlugInstall<cr> | |
map <leader>ps :source ~/.vimrc <bar> :PlugStatus<cr> | |
map <leader>pc :source ~/.vimrc <bar> :PlugClean<cr> | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Plugins | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
call plug#begin('~/.vim/plugged') | |
Plug 'leafgarland/typescript-vim' | |
Plug 'prettier/vim-prettier', { | |
\ 'do': 'yarn install', | |
\ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql','jsx'] } | |
Plug 'airblade/vim-gitgutter' | |
Plug 'benekastah/neomake' | |
Plug 'bronson/vim-trailing-whitespace' | |
Plug 'chrisbra/csv.vim' | |
Plug 'digitaltoad/vim-pug' | |
Plug 'editorconfig/editorconfig-vim' | |
"Plug 'edkolev/tmuxline.vim' | |
Plug 'garbas/vim-snipmate' | Plug 'MarcWeber/vim-addon-mw-utils' | Plug 'tomtom/tlib_vim' | |
Plug 'guns/xterm-color-table.vim' | |
Plug 'itchyny/lightline.vim' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install' } | |
Plug 'junegunn/vim-after-object' | |
Plug 'junegunn/fzf.vim' | |
Plug 'junegunn/goyo.vim' | |
Plug 'junegunn/vim-easy-align' | |
Plug 'junegunn/limelight.vim' | |
Plug 'kchmck/vim-coffee-script' | |
Plug 'mattn/gist-vim' | Plug 'mattn/webapi-vim' | |
Plug 'mattn/emmet-vim' | |
Plug 'robertYan/monokai-soda' | |
Plug 'scrooloose/nerdcommenter' | |
Plug 'scrooloose/nerdtree' | |
Plug 'shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
Plug 'slim-template/vim-slim' | |
Plug 'terryma/vim-multiple-cursors' | |
Plug 'tpope/vim-abolish' | |
Plug 'tpope/vim-endwise' | |
Plug 'tpope/vim-eunuch' | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-rails' | |
Plug 'tpope/vim-rake' | |
Plug 'tpope/vim-repeat' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-unimpaired' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'junegunn/vim-github-dashboard' | |
Plug 'junegunn/vim-emoji' | |
call plug#end() | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Plugin Config | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
let g:deoplete#enable_at_startup = 1 | |
let g:deoplete#enable_ignore_case = 0 | |
"let g:hardtime_default_on = 1 | |
let g:ruby_path = system('echo $HOME/.rbenv/shims') | |
let g:lightline = { | |
\ 'colorscheme': 'wombat', | |
\ 'component': { | |
\ 'readonly': '%{&readonly?"⭤":""}', | |
\ }, | |
\ 'component_function': { | |
\ 'filetype': 'MyFiletype', | |
\ 'fileformat': 'MyFileformat', | |
\ } | |
\ } | |
function! MyFiletype() | |
return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype . ' ' . WebDevIconsGetFileTypeSymbol() : 'no ft') : '' | |
endfunction | |
function! MyFileformat() | |
return winwidth(0) > 70 ? (&fileformat . ' ' . WebDevIconsGetFileFormatSymbol()) : '' | |
endfunction | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Plugin Mapping - benakastah/neomake | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
autocmd! BufWritePost * Neomake | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Plugin Mapping - bronson/vim-trailing-whitespace | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
map <leader>fw :FixWhitespace<cr> | |
autocmd BufWritePre * :FixWhitespace | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Plugin mapping - junegunn/fzf && junegunn/fzf-vim | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" List and select from file list | |
map <leader><tab> :Files<cr> | |
" List and select from mappings list | |
map <leader>lm <plug>(fzf-maps-n) | |
" Insert mode completion | |
imap <leader>f<tab> <plug>(fzf-complete-file) | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Plugin mapping - junegunn/vim-easy-align | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Interactive visual mode (e.g. vipa) | |
xmap a <plug>(EasyAlign) | |
" Interactive motion/text object (e.g. aip) | |
nmap a <plug>(EasyAlign) | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Plugin mapping - scrooloose/nerdcommenter | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Trigger commenting on every mode | |
imap <leader>/ <esc><plug>NERDCommenterToggle<cr>i | |
nmap <leader>/ <plug>NERDCommenterToggle<cr> | |
vmap <leader>/ <plug>NERDCommenterToggle | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Plugin mapping - scrooloose/nerdtree | |
" | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Open up NERDTree panel | |
map <leader>n :NERDTreeToggle<cr> :NERDTreeMirror<cr> | |
colorscheme monokai-soda | |
set laststatus=2 | |
set noshowmode | |
"command! -nargs=1 Agx call fzf#vim#ag_raw(<f-args>) | |
let $FZF_DEFAULT_COMMAND= 'ag -g ""' | |
"let g:gitgutter_sign_added = emoji#for('white_check_mark') | |
"let g:gitgutter_sign_modified = emoji#for('zap') | |
"let g:gitgutter_sign_removed = emoji#for('heavy_minus_sign') | |
"let g:gitgutter_sign_modified_removed = emoji#for('collision') | |
" | |
"let g:neomake_error_sign = {'text': emoji#for('fire'), 'texthl': 'NeomakeErrorSign'} | |
"let g:neomake_warning_sign = {'text': emoji#for('x'), 'texthl': 'NeomakeWarningSign' } | |
"set completefunc=emoji#complete | |
autocmd! User GoyoEnter Limelight | |
autocmd! User GoyoLeave Limelight! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment