Created
June 26, 2015 14:27
-
-
Save iaintatchbbc/b1aa91b6862b889ca760 to your computer and use it in GitHub Desktop.
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
| " remove any pre-existing auto-commands so we don't define them twice | |
| " if this .vimrc gets sourced twice | |
| :autocmd! | |
| if $SHELL =~ 'bin/fish' | |
| set shell=/bin/bash | |
| endif | |
| " Load ~/.vim/bundle packages | |
| call pathogen#infect() | |
| call pathogen#helptags() | |
| " Vundle | |
| set nocompatible | |
| filetype off | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| Bundle 'gmarik/vundle' | |
| Bundle 'Valloric/YouCompleteMe' | |
| Bundle 'airblade/vim-gitgutter' | |
| " CtrlP | |
| set runtimepath^=~/.vim/bundle/ctrlp.vim | |
| " Use semicolon to bring up a list of buffers | |
| :nmap ; :CtrlPBuffer<CR> | |
| " Enable the list of buffers | |
| let g:airline#extensions#tabline#enabled = 1 | |
| " Show just the filename | |
| let g:airline#extensions#tabline#fnamemod = ':t' | |
| " This allows buffers to be hidden if you've modified a buffer. | |
| " This is almost a must if you wish to use buffers in this way. | |
| set hidden | |
| " Use TAB and SHIFT-TAB to navigate through buffers | |
| nmap <TAB> :bn<CR> | |
| nmap <S-TAB> :bp<CR> | |
| filetype plugin indent on | |
| " Colour scheme settings | |
| syntax enable | |
| set t_Co=256 | |
| set background=dark | |
| colorscheme nightwish | |
| " colorscheme solarized | |
| " As I have a nice fast computer, this should ensure the best possible syntax | |
| " highlighting: | |
| syntax sync fromstart | |
| set encoding=utf8 | |
| " Display line numbers | |
| set number | |
| " Keep cursor away from edges of screen. | |
| set so=7 | |
| set mouse=a | |
| " Set xterm2 mouse mode to allow resizing of splits with mouse inside Tmux. | |
| set ttymouse=xterm2 | |
| set list listchars=tab:>.,trail:- | |
| set expandtab | |
| set shiftwidth=2 | |
| set tabstop=2 | |
| set smarttab | |
| set cindent | |
| let indent_guides_enable_on_vim_startup = 1 | |
| set showmatch | |
| set ignorecase smartcase | |
| set incsearch | |
| set wildmenu | |
| set smartindent | |
| set autoindent | |
| set cinkeys=0{,0},:,0#,!^F | |
| set directory^=$HOME/.vim_swap// | |
| set hlsearch | |
| let tlist_xquery_settings = 'xquery;f:function;v:variable;m:module' | |
| set tags=./tags; | |
| syn keyword myTodo contained TODO FIXME XXX TODO: FIXME: HACK | |
| " Ensure 'Airline' is always visible even if there are no split windows | |
| set laststatus=2 | |
| " Open NERDtree if no files were specified on startup | |
| autocmd vimenter * if !argc() | NERDTree | endif | |
| " Close vim automatically if NERDTree is the only window left open | |
| "autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif | |
| " Use \e to toggle NERDtree | |
| :nmap \e :NERDTreeToggle<CR> | |
| " F3 to show Tag List (ctags) | |
| nmap <F3> :TlistToggle<cr> | |
| "nmap <F4> :TlistAddFilesRecursive . *.xq*<cr> | |
| nmap <F5> g<C-]> | |
| " F9 to show Undo history | |
| nnoremap <F9> :GundoToggle<CR> | |
| " Use backslash-n to clear highlighting after a search | |
| :nmap \n :noh<CR> | |
| nmap <F12> :! echo -e "\n--------------------------\n"; $HOME/bin/run-marklogic-test %<cr> | |
| " Try to make default clipboard register (") work better with X Clipboard | |
| set clipboard=unnamedplus | |
| " For gitgutter (https://github.com/airblade/vim-gitgutter) | |
| map <C-F12> :GitGutterLineHighlightsToggle<cr> | |
| autocmd VimEnter GitGutterEnable | |
| let g:gitgutter_sign_column_always = 1 | |
| let g:gitgutter_highlight_lines = 1 | |
| " For xolox session-handler (https://github.com/xolox/vim-session) | |
| let g:session_autosave_periodic = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment