2014-04-09 08:07:12 -04:00
|
|
|
"============================================================"
|
|
|
|
" "
|
|
|
|
" Darkcloud Vim Config: main settings "
|
|
|
|
" "
|
2014-06-17 01:49:46 -04:00
|
|
|
" By: Kevin MacMartin (prurigro@gmail.com) "
|
2014-04-09 08:07:12 -04:00
|
|
|
" Website: https://github.com/prurigro/darkcloud-vimconfig "
|
|
|
|
" "
|
|
|
|
" License: MIT "
|
|
|
|
" "
|
|
|
|
"============================================================"
|
2014-02-20 23:24:20 -05:00
|
|
|
|
2014-03-11 03:05:09 -04:00
|
|
|
"COMPATIBILITY SETTINGS: DOCUMENT AND ENVIRONMENT SETTINGS {{{
|
2014-03-28 07:36:19 -04:00
|
|
|
set nocompatible "enable vim specific capabilities
|
|
|
|
set encoding=utf-8 "set encoding
|
|
|
|
set fileformats=unix,dos,mac "set compatible line endings in order of preference
|
|
|
|
set backspace=indent,eol,start "enables backspacing
|
|
|
|
set clipboard=unnamedplus "enable copy/paste support between vim and the environment's clipboard
|
|
|
|
set lazyredraw "only redraw what needs to be redrawn
|
|
|
|
set ttyfast "assume a fast connection to the terminal for better rendering
|
2014-02-20 23:24:20 -05:00
|
|
|
|
2014-04-09 15:05:42 -04:00
|
|
|
set mouse=a "enables mouse functionality with extended capabilities
|
|
|
|
if has("mouse_sgr")
|
|
|
|
set ttymouse=sgr "use mouse handling that emits sgr-style reporting if it's available
|
|
|
|
else
|
|
|
|
set ttymouse=xterm2 "fall back to xterm2-style reporting if sgr isn't available
|
|
|
|
endif
|
|
|
|
|
2014-03-11 03:05:09 -04:00
|
|
|
if $TERM =~ '^linux'
|
|
|
|
set t_Co=8 "use 8 colours when a vterm is detected
|
|
|
|
elseif !has("gui_running")
|
|
|
|
set t_Co=256 "assume 256 colours when any other terminal is detected
|
|
|
|
endif
|
|
|
|
"}}}
|
2014-02-20 23:24:20 -05:00
|
|
|
|
2014-03-11 03:05:09 -04:00
|
|
|
"GENERAL: ANYTHING THAT DOESN'T FIT ELSEWHERE {{{
|
|
|
|
set number "enable line numbers
|
|
|
|
set nowrap "disable line wrapping
|
2014-03-28 07:36:19 -04:00
|
|
|
set cursorline cursorcolumn "enable row/column highlighting
|
|
|
|
set visualbell "notify visually instead of with an audible bell
|
|
|
|
set splitright "add new tiles on the right (and not left) when added
|
Tons of changes all in one commit because I'd broken a commit a while
back and opted to simply reverse them all- Lots of colour changes, the
update script now removes decommissioned bundles, gentags script can now
have additional paths added to it when generating a tags file, README is
much improved, fixed a few issues that required remapping some toggles,
fixed a bunch of issues with the colourscheme between the terminal and
gvim. You can now setup a custom config file to have loaded after the
darkcloud-vimconfig ones, and there's a custom location for pathogen
modules too, to make things tidier without necessarily needing to use
an additional runtimepath. You can also create a file in your home
directory to assign filetypes to programs, for use with the file
manager. A file can be placed in ~/.vim/ with file associations and
prorams to launch them with. The file manager will also open a file with
vim by hitting shift+enter, since e isn't all that comfortablly placed.
The vimrc can now also point to the darkcloud-vimconfig folder, rather
than relying on the vim folder being in a specific location, and the
after folder is now configured to work in the project too.
2014-04-04 19:49:02 -04:00
|
|
|
set scrolloff=0 sidescrolloff=0 "start scrolling if the cursor is one position away from the edge
|
2014-04-04 01:10:01 -04:00
|
|
|
set list listchars=tab:>-,trail:- "display tabs as: >--- and trailing spaces as: -
|
2014-03-11 03:05:09 -04:00
|
|
|
set autochdir "current dir is file dir
|
2014-03-28 07:36:19 -04:00
|
|
|
set history=250 "undo history
|
2014-06-04 03:18:29 -04:00
|
|
|
set timeoutlen=800 ttimeoutlen=0 "shorten the timeout length of escapes
|
2014-03-11 03:05:09 -04:00
|
|
|
set whichwrap=b,s,<,>,[,] "allow the cursor to wrap lines
|
|
|
|
set showmatch "show matching open bracket when closed bracket is inserted
|
|
|
|
set matchtime=5 "the amount of time the matching bracket will highlight
|
|
|
|
set smarttab expandtab autoindent tabstop=4 shiftwidth=4 "configure tabs
|
|
|
|
set laststatus=2 showcmd statusline=%F%m%r%h%w[%L][%{&ff}]%y[%p%%][%04l,%04v] "statusline init and config
|
|
|
|
set hlsearch incsearch ignorecase smartcase "configure search
|
2014-04-08 00:13:03 -04:00
|
|
|
set diffopt=foldcolumn:0,filler "vimdiff default settings
|
|
|
|
set formatoptions=roqnl12 "how automatic formatting is to be done
|
|
|
|
set foldmethod=syntax foldcolumn=1 foldlevel=3 "fold layers 3 or more deep
|
2014-07-16 10:00:50 -04:00
|
|
|
let &showbreak="" "highlight wrapped lines when linewrap is enabled
|
2014-02-21 02:34:23 -05:00
|
|
|
|
2014-03-28 07:36:19 -04:00
|
|
|
"enable tab completion in command mode and configure how it handles extensions
|
2014-03-11 03:05:09 -04:00
|
|
|
set completeopt=longest,menuone
|
|
|
|
set wildmenu
|
|
|
|
set wildmode=list:longest,full
|
|
|
|
set wildignore=*.dll,*.o,*.obj,*.bak,*.exe,*.pyc,*.jpg,*.gif,*.png
|
|
|
|
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
|
|
|
|
"}}}
|
2014-02-20 23:24:20 -05:00
|
|
|
|
2014-04-02 11:17:12 -04:00
|
|
|
"FILETYPES AND SYNTAX: SETTINGS FOR FILETYPES AND ASSOCIATED SYNTAX {{{
|
2014-03-28 07:36:19 -04:00
|
|
|
filetype plugin indent on
|
2014-06-04 03:18:29 -04:00
|
|
|
syntax on
|
2014-04-02 11:17:12 -04:00
|
|
|
|
2014-06-09 02:15:35 -04:00
|
|
|
"set given filenames to various filetypes
|
|
|
|
au BufNewFile,BufRead pacman.conf,yaourtrc setf sh
|
|
|
|
au BufNewFile,BufRead cjdroute.conf,cjdmaid.conf setf json
|
2014-07-16 06:46:17 -04:00
|
|
|
au BufNewFile,BufRead *muttrc setf muttrc
|
|
|
|
au BufNewFile,BufRead *ircd.conf setf javascript
|
|
|
|
au BufNewFile,BufRead *.aspx,*.asmx,*.ascx,*.master setf aspnet
|
|
|
|
au BufNewFile,BufRead *.gradle setf groovy
|
2014-03-28 07:36:19 -04:00
|
|
|
"}}}
|
|
|
|
|
2014-03-11 03:05:09 -04:00
|
|
|
"GVIM: GUI CONFIG OPTIONS {{{
|
2014-03-28 07:36:19 -04:00
|
|
|
set guicursor+=a:blinkon0 "disable the blinking cursor
|
2014-06-25 02:47:29 -04:00
|
|
|
set guioptions=aegip "enable some good defaults for gvim
|
|
|
|
set guioptions+=lRb "enable scrollbars (right only when a split is present)
|
2014-03-11 03:05:09 -04:00
|
|
|
"}}}
|