Skip to content

Instantly share code, notes, and snippets.

@hvmonteiro
Last active March 29, 2020 19:27
Show Gist options
  • Save hvmonteiro/f120dc0e57dbcf074a1d9bdab51316b1 to your computer and use it in GitHub Desktop.
Save hvmonteiro/f120dc0e57dbcf074a1d9bdab51316b1 to your computer and use it in GitHub Desktop.
VIM custom settings using shellcheck with syntastic
"
" Author: Hugo Monteiro
" Description: Customized VIM settings with syntax checker, highlighting nad error follow up
" and jshint (if installed)
" Last Changed: 01-03-2018
" Notes: File to be used as ~/.vimrc
"
"color desert
"color darkblue
color molokai
set nowrap
" Increase copY buffer maximum register size to 1000kb (20 = remember changes
" for the previously opened 20 files)
set viminfo='20,<1000
"#########################################
" Custom key bindings for error follow up
"#########################################
map <F8> :lnext <CR>
map <S-F8> :lprev <CR>
"#################################################
"" Easier split navigation (CTRL+W -> cursorkeys)
"#################################################
"
"" Use ctrl-[hjkl] to select the active split!
"nmap <silent> <c-k> :wincmd k<CR>
"nmap <silent> <c-j> :wincmd j<CR>
"nmap <silent> <c-h> :wincmd h<CR>
"nmap <silent> <c-l> :wincmd l<CR>
nnoremap <silent> <C-Right> <c-w>l
nnoremap <silent> <C-Left> <c-w>h
nnoremap <silent> <C-Up> <c-w>k
nnoremap <silent> <C-Down> <c-w>j
set history=500
set statusline=%<%f%m%r%y%=%b\ 0x%B\ \ %l,%c%V\ %P
set laststatus=2 " always a status line
set encoding=utf-8
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax enable
set hlsearch
" colorscheme mycolors " Custom colors if the file/highlight file exists
endif
" Editor basics {{{
" Behave like Vim instead of Vi
set nocompatible
" Show the current cursor position
set ruler
" Enable syntax highlighting
syn on
" }}}
" Mouse {{{
" Send more characters for redraws
set ttyfast
" Enable mouse use in all modes
"set mouse=a
" Set this to the name of your terminal that supports mouse codes.
" Must be one of: xterm, xterm2, netterm, dec, jsbterm, pterm
set ttymouse=xterm2
" }}}
" size of a hard tabstop
set tabstop=4
"
" size of an "indent"
set shiftwidth=4
"
" a combination of spaces and tabs are used to simulate tab stops at a width
" other than the (hard)tabstop
set softtabstop=4
"
" make "tab" insert indents instead of tabs at the beginning of a line
set smarttab
"
" always uses spaces instead of tab characters
set expandtab
"
"
"For Syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_loc_list_height = 5 " syntax info window is 5 rows height
" For JAvaScript using JSHint
let g:syntastic_javascript_checkers = ['jshint']
" Vundle
set nocompatible " be iMproved, required
filetype off " required
"set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
"
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'wincent/command-t'
Plugin 'flazz/vim-colorschemes'
Plugin 'syntastic'
Plugin 'kawaz/shellcheck.vim'
Plugin 'Shell.vim'
Plugin 'chrisbra/csv.vim'
Bundle 'lrvick/Conque-Shell'
call vundle#end() " required
filetype plugin indent on " required
filetype plugin on
"
hi StatusLine ctermbg=white ctermfg=black
"
@hvmonteiro
Copy link
Author

hvmonteiro commented Jun 10, 2017

How to install:


wget https://gist.github.com/hvmonteiro/f120dc0e57dbcf074a1d9bdab51316b1/raw/3a7ca25384826c6a3305f84d84db3c53473e5393/.vimrc -O ~/.vimrc
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim +PluginInstall +qall


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment