Last active
March 29, 2020 19:27
-
-
Save hvmonteiro/f120dc0e57dbcf074a1d9bdab51316b1 to your computer and use it in GitHub Desktop.
VIM custom settings using shellcheck with syntastic
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
" | |
" 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 | |
" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to install: