Last active
June 22, 2020 01:52
-
-
Save ingscjoshua/cbe2df727debe697667bbb3acc8ac5a8 to your computer and use it in GitHub Desktop.
Configuration for VIM
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
syntax on | |
set guicursor= | |
set noshowmatch | |
set relativenumber | |
set nohlsearch | |
set hidden | |
set noerrorbells | |
set tabstop=2 softtabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set smartindent | |
set nu | |
set smartcase | |
set noswapfile | |
set nobackup | |
set undodir=~/.vim/undodir | |
set undofile | |
set incsearch | |
set termguicolors | |
set scrolloff=8 | |
set encoding=utf-8 | |
set mouse=a | |
set laststatus=2 | |
set noshowmode | |
call plug#begin('~/.vim/plugged') | |
" IDE | |
Plug 'easymotion/vim-easymotion' | |
Plug 'preservim/nerdtree' | |
Plug 'elixir-editors/vim-elixir' " Elixir Support | |
Plug 'posva/vim-vue' " Vue support | |
Plug 'zerodragon/onehalfdark' " Color Theme | |
Plug 'ap/vim-css-color' " Display CSS hex codes as colors | |
Plug 'dense-analysis/ale' " Lintern | |
Plug 'itchyny/lightline.vim' " Lighline (eyecandy) | |
Plug 'zerodragon/onehalfdark' " Color Theme | |
Plug 'terryma/vim-multiple-cursors' " Multiple cursors | |
Plug 'turbio/bracey.vim' " live server | |
" post install (yarn install | npm install) then load plugin only for editing supported files | |
" Plug 'sheerun/vim-polyglot' | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
Plug 'junegunn/fzf.vim' | |
Plug 'prettier/vim-prettier', { 'do': 'npm install' } | |
Plug 'jiangmiao/auto-pairs' " Auto close brackets, parenthesis, etc | |
Plug 'ryanoasis/vim-devicons' "Icons for vim | |
call plug#end() | |
" yank to clipboard | |
if has("clipboard") | |
set clipboard=unnamed " copy to the system clipboard | |
if has("unnamedplus") " X11 support | |
set clipboard+=unnamedplus | |
endif | |
endif | |
let mapleader = " " | |
nmap <Leader>s <Plug>(easymotion-s2) | |
nmap <Leader>n :NERDTreeFind<CR> | |
nmap <Leader>w :w<CR> | |
nmap <Leader>q :q<CR> | |
nmap <C-l> :tabn<CR> | |
nmap <C-h> :tabp<CR> | |
nmap <C-n> :tabnew<CR> | |
nmap <Leader>r :Bracey<CR> | |
nmap <Leader>d :BraceyStop<CR><CR> | |
nnoremap <Leader>f :NERDTreeToggle<Enter> | |
nnoremap <C-p> :GFiles<CR> | |
nnoremap <Leader>pf :Files<CR> | |
map <C-f> :Ag<CR> | |
map <C-q> :qa<CR> | |
nnoremap <silent> <leader><backspace> :set nowrap!<CR> | |
" Search for ctags | |
nnoremap <leader>. :CtrlPTag<cr> | |
" Enable colorscheme and true colors | |
colorscheme onehalfdark | |
if exists('+termguicolors') | |
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" | |
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" | |
set termguicolors | |
endif | |
" NERDTree colors | |
function! NERDTreeHighlightFile(extension, fg) | |
exec 'autocmd filetype nerdtree highlight ' . a:extension .' guibg=NONE guifg='. a:fg | |
exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#' | |
endfunction | |
call NERDTreeHighlightFile('pug', '#AE403F') | |
call NERDTreeHighlightFile('md', '#689FB6') | |
call NERDTreeHighlightFile('yml', '#F09F17') | |
call NERDTreeHighlightFile('config', '#666666') | |
call NERDTreeHighlightFile('json', '#D4843E') | |
call NERDTreeHighlightFile('html', '#AE403F') | |
call NERDTreeHighlightFile('sass', '#689FB6') | |
call NERDTreeHighlightFile('css', '#689FB6') | |
call NERDTreeHighlightFile('js', '#F16529') | |
call NERDTreeHighlightFile('php', '#834F79') | |
call NERDTreeHighlightFile('Dockerfile', '#44788E') | |
call NERDTreeHighlightFile('vue', '#42B883') | |
" Editor color settings | |
highlight TabLineFill guibg=#1e1f2a ctermbg=236 | |
highlight Normal guibg=NONE ctermbg=NONE | |
highlight LineNr guibg=NONE ctermbg=NONE | |
" Various plugin configuration | |
let g:multi_cursor_use_default_mapping = 0 | |
let g:NERDTreeShowHidden = 1 | |
let g:NERDTreeWinSize = 30 | |
let g:NERDTreeIgnore = ['^node_modules$','^.git$'] | |
let g:NERDTreeMinimalUI = 1 | |
let g:lightline = {'colorscheme': 'onehalfdark'} | |
let g:NERDTreeDirArrowExpandable = '►' | |
let g:NERDTreeDirArrowCollapsible = '▼' | |
autocmd StdinReadPre * let s:std_in=1 | |
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif | |
let g:multi_cursor_next_key = '<C-d>' | |
let g:multi_cursor_start_word_key = '<C-d>' | |
let g:multi_cursor_quit_key = '<Esc>' | |
" Configuración Prettier | |
let g:prettier#autoformat = 1 | |
filetype plugin indent on | |
" Backspace config | |
set backspace=indent,eol,start | |
"https://github.com/ryanoasis/vim-devicons configuracion para iconos de | |
"iconos configurar la fuente en iTerm2 | |
set guifont=DroidSansMono\ Nerd\ Font:h11 | |
"Configuracion para ver los puntos en la identación | |
set list lcs=trail:·,space:·,tab:-→ | |
set updatetime=300 | |
" always show signcolumns | |
set signcolumn=yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment