102 lines
2.4 KiB
VimL
102 lines
2.4 KiB
VimL
" Disable compatibility with vi which can cause unexpected issues
|
|
set nocompatible
|
|
|
|
" Enable type file detection. Vim will be able to try to detect the type of file in use
|
|
filetype on
|
|
" Enable plugins and load plugin for the detected file type
|
|
filetype plugin on
|
|
" Load an indent file for the detected file type
|
|
filetype indent on
|
|
" Turn syntax highlighting on
|
|
syntax on
|
|
" Auto indent
|
|
set ai
|
|
" Smart indent
|
|
set si
|
|
|
|
|
|
" Add numbers to each line on the left-hand side.
|
|
set number
|
|
" Highlight cursor line underneath the cursor horizontally
|
|
set cursorline
|
|
" Highlight cursor line underneath the cursor vertically
|
|
" set cursorcolumn
|
|
|
|
|
|
" Set shift width to 4 spaces
|
|
set shiftwidth=2
|
|
" Set tab width to 2 columns
|
|
set tabstop=2
|
|
" Use space characters instead of tabs
|
|
set expandtab
|
|
|
|
|
|
" While searching though a file incrementally highlight matching characters as you type
|
|
set incsearch
|
|
" Show the mode you are on the last line
|
|
set showmode
|
|
" Show matching words during a search
|
|
set showmatch
|
|
" Use highlighting when doing a search
|
|
set hlsearch
|
|
" Ignore case when searching
|
|
set ignorecase
|
|
" When searching try to be smart about cases
|
|
set smartcase
|
|
|
|
" For regular expressions turn magic on
|
|
set magic
|
|
|
|
" Set 7 lines to the cursor - when moving vertically using j/k
|
|
set so=7
|
|
|
|
" Use highlighting when doing a search
|
|
set hlsearch
|
|
" Make wildmenu behave like similar to Bash completion
|
|
set wildmode=list:longest
|
|
" There are certain files that we would never want to edit with Vim.
|
|
" Wildmenu will ignore files with these extensions.
|
|
set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx,*/.git/*
|
|
|
|
" Configure backspace so it acts as it should act
|
|
set backspace=eol,start,indent
|
|
set whichwrap+=<,>,h,l
|
|
|
|
" Sets how many lines of history VIM has to remember
|
|
set history=500
|
|
|
|
|
|
|
|
" PLUGINS ---------------------------------------------------------------- {{{
|
|
|
|
" Plugin code goes here.
|
|
|
|
" }}}
|
|
|
|
|
|
" MAPPINGS --------------------------------------------------------------- {{{
|
|
|
|
" Mappings code goes here.
|
|
|
|
" }}}
|
|
|
|
|
|
" VIMSCRIPT -------------------------------------------------------------- {{{
|
|
|
|
" This will enable code folding.
|
|
" Use the marker method of folding.
|
|
augroup filetype_vim
|
|
autocmd!
|
|
autocmd FileType vim setlocal foldmethod=marker
|
|
augroup END
|
|
|
|
" More Vimscripts code goes here.
|
|
|
|
" }}}
|
|
|
|
|
|
" STATUS LINE ------------------------------------------------------------ {{{
|
|
|
|
" Status bar code goes here.
|
|
|
|
" }}}
|