Advertisement
tyler569

Untitled

Nov 23rd, 2017
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 4.82 KB | None | 0 0
  1.  
  2. set nocompatible    " Because what's even the point without this?
  3. set encoding=utf-8  " It's two thousand $year !
  4. set hidden          " Allow hidden buffers - something required this
  5.  
  6. "NeoBundle Scripts-----------------------------
  7. if has('vim_starting')
  8.   " Required:
  9.   set runtimepath+=/Users/tyler/.config/nvim/bundle/neobundle.vim/
  10. endif
  11.  
  12. " Required:
  13. call neobundle#begin(expand('/Users/tyler/.config/nvim/bundle'))
  14.  
  15. " Let NeoBundle manage NeoBundle
  16. " Required:
  17. NeoBundleFetch 'Shougo/neobundle.vim'
  18.  
  19. " Basic editing packages
  20. NeoBundle 'Raimondi/delimitMate'
  21. NeoBundle 'ctrlpvim/ctrlp.vim'
  22. NeoBundle 'vim-airline/vim-airline'
  23. NeoBundle 'vim-airline/vim-airline-themes'
  24. NeoBundle 'vim-syntastic/syntastic'
  25. NeoBundle 'airblade/vim-gitgutter'
  26. " NeoBundle 'ap/vim-buftabline'
  27.  
  28. " Languages
  29. NeoBundle 'rust-lang/rust.vim'
  30. NeoBundle 'elixir-editors/vim-elixir'
  31. NeoBundle 'slashmili/alchemist.vim'
  32. NeoBundle 'vim-erlang/vim-erlang-runtime'
  33. NeoBundle 'fatih/vim-go'
  34. NeoBundle 'zah/nim.vim'
  35.  
  36. " Required:
  37. call neobundle#end()
  38.  
  39. " Required:
  40. filetype plugin indent on
  41.  
  42. " If there are uninstalled bundles found on startup,
  43. " this will conveniently prompt you to install them.
  44. NeoBundleCheck
  45. "End NeoBundle Scripts-------------------------
  46.  
  47. " Plugin config
  48.  
  49. " vim-airline
  50. let g:airline_powerline_fonts = 1
  51. let g:airline#extensions#tabline#enabled = 0
  52. set noshowmode              " Redundant - airline shows the mode
  53.  
  54. " syntastic
  55. let g:syntastic_always_populate_loc_list = 1
  56. let g:syntastic_auto_loc_list = 1
  57. let g:syntastic_check_on_open = 0
  58. let g:syntastic_check_on_wq = 0
  59.  
  60. " let g:syntastic_cpp_compiler = "clang"
  61. " let g:syntastic_cpp_compiler_options = "-std=c++14"
  62.  
  63. " delimitMate
  64. let g:delimitMate_expand_cr = 1
  65. let g:delimitMate_expand_space = 1
  66.  
  67.  
  68.  
  69. syntax on
  70. filetype plugin indent on
  71.  
  72. " 256 colors and colorscheme
  73. if $TERM =~ "256color"
  74.     set t_Co=256
  75. endif
  76. colorscheme default
  77.  
  78. " We have the tehnology for italics
  79. if $TERM =~ "italic"
  80.     highlight Comment cterm=italic
  81. endif
  82.  
  83. " Tell terminal my name
  84. set titlestring=vim\ %{expand(\"%t\")}
  85.  
  86. " Indentation rules
  87. set expandtab               " Tabs -> spaces
  88. set softtabstop=4           " Tabs -> spaces gooder
  89. set tabstop=4               " Show tabs as 4 spaces
  90. set shiftwidth=4            " Reident 4 spaces
  91. set cindent                 " C indentation rules
  92. set cinoptions=:0,g0        " Move 'public:' etc. to the left
  93. set modeline                " Lemme change it per file
  94.  
  95. " Backups and swapfiles
  96. set backupdir=~/.vim/backup " Backups over there
  97. set directory=~/.vim/swap   " Swapfiles over there
  98. set writebackup             " Do actually do backups
  99. if has('persistent_undo')
  100.     set undodir=~/.vim/undo     " Persistent undo
  101.     set undofile                " See above
  102. endif
  103.  
  104. " UI
  105. set number                  " Line numbers ...
  106. highlight LineNr ctermfg=darkgrey
  107.                             " ... in a better color
  108. set numberwidth=3           " Start linenumbers at 3 digits
  109. "set relativenumber          " Line numbers relative to current location
  110. set laststatus=2            " Status line for file names
  111. set backspace=2             " Make backspace work
  112. set showcmd                 " Show incomplete commands
  113. set wildmenu                " Menu for command mode
  114. set lazyredraw              " Don't redraw the screen in macros etc.
  115. set showmatch               " Highlight matching [{()}]
  116. set display=lastline,uhex   " Show the last line even if it is too long
  117. set visualbell              " I don't do bell sounds
  118. set scrolloff=2             " Show 2 lines of context
  119. "set listchars=tab:→\ ,trail:▸
  120. "set list                    " Show hidden undesirable characters
  121.  
  122. " Searching
  123. set incsearch               " Search as you type
  124. set hlsearch                " Highlight all matches
  125. set ignorecase              " Ignore case on searching ...
  126. set smartcase               " ... unless I use a capital
  127.  
  128. " Folding
  129. set foldmethod=indent       " Fold on indentation - should always be right (enough)
  130. set foldnestmax=3           " Don't fold too deep though
  131. set nofoldenable            " And not by default plx
  132.  
  133.  
  134. " I hate typing - these make it (slightly) less painful
  135. nnoremap q:     :q
  136. nnoremap :Q     :q
  137. nnoremap :W     :w
  138.  
  139. let mapleader=","
  140.  
  141. nnoremap <leader><tab>      gg=G
  142. nnoremap <leader><space>    :nohlsearch<CR>
  143. nnoremap <leader>s          :w<CR>
  144. nnoremap <leader>?          :tab help<CR>
  145. nnoremap <leader>b          :buffers<CR>
  146. nnoremap <leader>m          :<C-U>exe "buffer" . v:count1<CR>
  147.  
  148. inoremap ;<CR>              <END>;<CR>
  149.  
  150. " Backup to /tmp except what's in /tmp
  151. set backup
  152. set backupdir=/tmp
  153. set backupskip=/tmp
  154. set directory=/tmp
  155. set writebackup
  156.  
  157. " When moving between panes, C-hjkl instead of C-w C-hjkl
  158. nnoremap <C-H> <C-W><C-H>
  159. nnoremap <C-J> <C-W><C-J>
  160. nnoremap <C-K> <C-W><C-K>
  161. nnoremap <C-L> <C-W><C-L>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement