Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set nocompatible " Because what's even the point without this?
- set encoding=utf-8 " It's two thousand $year !
- set hidden " Allow hidden buffers - something required this
- "NeoBundle Scripts-----------------------------
- if has('vim_starting')
- " Required:
- set runtimepath+=/Users/tyler/.config/nvim/bundle/neobundle.vim/
- endif
- " Required:
- call neobundle#begin(expand('/Users/tyler/.config/nvim/bundle'))
- " Let NeoBundle manage NeoBundle
- " Required:
- NeoBundleFetch 'Shougo/neobundle.vim'
- " Basic editing packages
- NeoBundle 'Raimondi/delimitMate'
- NeoBundle 'ctrlpvim/ctrlp.vim'
- NeoBundle 'vim-airline/vim-airline'
- NeoBundle 'vim-airline/vim-airline-themes'
- NeoBundle 'vim-syntastic/syntastic'
- NeoBundle 'airblade/vim-gitgutter'
- " NeoBundle 'ap/vim-buftabline'
- " Languages
- NeoBundle 'rust-lang/rust.vim'
- NeoBundle 'elixir-editors/vim-elixir'
- NeoBundle 'slashmili/alchemist.vim'
- NeoBundle 'vim-erlang/vim-erlang-runtime'
- NeoBundle 'fatih/vim-go'
- NeoBundle 'zah/nim.vim'
- " Required:
- call neobundle#end()
- " Required:
- filetype plugin indent on
- " If there are uninstalled bundles found on startup,
- " this will conveniently prompt you to install them.
- NeoBundleCheck
- "End NeoBundle Scripts-------------------------
- " Plugin config
- " vim-airline
- let g:airline_powerline_fonts = 1
- let g:airline#extensions#tabline#enabled = 0
- set noshowmode " Redundant - airline shows the mode
- " syntastic
- let g:syntastic_always_populate_loc_list = 1
- let g:syntastic_auto_loc_list = 1
- let g:syntastic_check_on_open = 0
- let g:syntastic_check_on_wq = 0
- " let g:syntastic_cpp_compiler = "clang"
- " let g:syntastic_cpp_compiler_options = "-std=c++14"
- " delimitMate
- let g:delimitMate_expand_cr = 1
- let g:delimitMate_expand_space = 1
- syntax on
- filetype plugin indent on
- " 256 colors and colorscheme
- if $TERM =~ "256color"
- set t_Co=256
- endif
- colorscheme default
- " We have the tehnology for italics
- if $TERM =~ "italic"
- highlight Comment cterm=italic
- endif
- " Tell terminal my name
- set titlestring=vim\ %{expand(\"%t\")}
- " Indentation rules
- set expandtab " Tabs -> spaces
- set softtabstop=4 " Tabs -> spaces gooder
- set tabstop=4 " Show tabs as 4 spaces
- set shiftwidth=4 " Reident 4 spaces
- set cindent " C indentation rules
- set cinoptions=:0,g0 " Move 'public:' etc. to the left
- set modeline " Lemme change it per file
- " Backups and swapfiles
- set backupdir=~/.vim/backup " Backups over there
- set directory=~/.vim/swap " Swapfiles over there
- set writebackup " Do actually do backups
- if has('persistent_undo')
- set undodir=~/.vim/undo " Persistent undo
- set undofile " See above
- endif
- " UI
- set number " Line numbers ...
- highlight LineNr ctermfg=darkgrey
- " ... in a better color
- set numberwidth=3 " Start linenumbers at 3 digits
- "set relativenumber " Line numbers relative to current location
- set laststatus=2 " Status line for file names
- set backspace=2 " Make backspace work
- set showcmd " Show incomplete commands
- set wildmenu " Menu for command mode
- set lazyredraw " Don't redraw the screen in macros etc.
- set showmatch " Highlight matching [{()}]
- set display=lastline,uhex " Show the last line even if it is too long
- set visualbell " I don't do bell sounds
- set scrolloff=2 " Show 2 lines of context
- "set listchars=tab:→\ ,trail:▸
- "set list " Show hidden undesirable characters
- " Searching
- set incsearch " Search as you type
- set hlsearch " Highlight all matches
- set ignorecase " Ignore case on searching ...
- set smartcase " ... unless I use a capital
- " Folding
- set foldmethod=indent " Fold on indentation - should always be right (enough)
- set foldnestmax=3 " Don't fold too deep though
- set nofoldenable " And not by default plx
- " I hate typing - these make it (slightly) less painful
- nnoremap q: :q
- nnoremap :Q :q
- nnoremap :W :w
- let mapleader=","
- nnoremap <leader><tab> gg=G
- nnoremap <leader><space> :nohlsearch<CR>
- nnoremap <leader>s :w<CR>
- nnoremap <leader>? :tab help<CR>
- nnoremap <leader>b :buffers<CR>
- nnoremap <leader>m :<C-U>exe "buffer" . v:count1<CR>
- inoremap ;<CR> <END>;<CR>
- " Backup to /tmp except what's in /tmp
- set backup
- set backupdir=/tmp
- set backupskip=/tmp
- set directory=/tmp
- set writebackup
- " When moving between panes, C-hjkl instead of C-w C-hjkl
- nnoremap <C-H> <C-W><C-H>
- nnoremap <C-J> <C-W><C-J>
- nnoremap <C-K> <C-W><C-K>
- nnoremap <C-L> <C-W><C-L>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement