Skip to content

Instantly share code, notes, and snippets.

@aeciolevy
Last active February 3, 2019 21:24
Show Gist options
  • Save aeciolevy/bfaa2729f3d54b11f3df968accbb5aa9 to your computer and use it in GitHub Desktop.
Save aeciolevy/bfaa2729f3d54b11f3df968accbb5aa9 to your computer and use it in GitHub Desktop.
Vim config
" Load Pathogen Plugin
execute pathogen#infect()
" General
set number " Show line numbers
set linebreak " Break lines at word (requires Wrap lines)
set showbreak=+++ " Wrap-broken line prefix
set textwidth=100 " Line wrap (number of cols)
set showmatch " Highlight matching brace
set hlsearch " Highlight all search results
set smartcase " Enable smart-case search
set ignorecase " Always case-insensitive
set incsearch " Searches for strings incrementally
set autoindent " Auto-indent new lines
set shiftwidth=4 " Number of auto-indent spaces
set smartindent " Enable smart-indent
set smarttab " Enable smart-tabs
set softtabstop=4 " Number of spaces per Tab
" Advanced
set ruler " Show row and column ruler information
set undolevels=1000 " Number of undo levels
set backspace=indent,eol,start " Backspace behaviour
filetype on "
syntax on " Sintax highlight based on filename
" Font Setup
set guifont=Fira\ Code\ Regular:h14
colorscheme Tomorrow-Night-Bright
" add a column at 90
set colorcolumn=90
" Open vim with this size
"set lines=35 columns=150
" Leader Key
let mapleader=" "
" Space(Leader Key) + S to reload vimrc
map <leader>s :source ~/.vimrc<CR>
" Cancel search with escape
" nnoremap <silent> <Esc> :nohlsearch<Bar>:echo<CR>
" Show Matching Parenthesis
set showmatch
" NERDTREE SETUP
"Hit the right arrow to open a node:
let NERDTreeMapActivateNode='<right>'
" Display hidden files:
let NERDTreeShowHidden=1
" Toggle display of the tree with <Leader> + n
:nmap <leader>n :NERDTreeToggle<CR>
" Locate the focused file in the tree with <Leader> + j
nmap <leader>j :NERDTreeFind<CR>
" Always open the tree when booting Vim, but don’t focus it
autocmd VimEnter * NERDTree
autocmd VimEnter * wincmd p
" Do not display some useless files in the tree
let NERDTreeIgnore=['\.DS_Store', '\~$', '\.swp'] 30,1 3%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment