Guest User

Untitled

a guest
Oct 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.82 KB | None | 0 0
  1. set hlsearch "Highlight searches
  2. set incsearch "Incremental search
  3. set ls=2 "Always show status line in all windows
  4. set autoindent "Auto indent on new line
  5. set expandtab "tabs to spaces
  6. set tabstop=2 "Tabs are 2 spaces in width
  7. set shiftwidth=2 "Autodindent to 2 spaces width
  8. set scrolloff=10 "Start scrolling when 10 lines close to the bottom
  9. set ruler "Shows current file position
  10. set statusline=%<%f\ %h%m%y%r%=%-14.(%l,%c%V%)\ %P
  11. set cursorcolumn "Highlight current column
  12. set cursorline "Highlight current row
  13. set novisualbell "Don't shake the screen
  14. set number "show line numbers
  15. set title "Change title of window based on file
  16. set ttyfast "Smoother display for fast terminals
  17. set hidden "Don't close buffers when changing files
  18. set wildchar=<Tab> "Tab expands wildcards
  19. set fileencoding=utf8 "Unicode man
  20. set nocompatible "Get all of vim's awesomeness
  21. set backspace=indent,eol,start "Allow backspacing over tabs end of lines and start of insert
  22. set wildmode=longest,list "Better tab completion of filenames (like bash)
  23. set wildmenu "as above
  24. "Allows use of %/ for current directory
  25. cmap %/ %:p:h/
  26.  
  27. "256 coloras
  28. if $COLORTERM == 'gnome-terminal'
  29. set t_Co=256
  30. endif
  31. set background=dark "Tell vim I'm using a dark background
  32. colorscheme desert
  33. syntax on "syntax highlighting
  34.  
  35. "custom colors
  36. hi CursorLine ctermbg=234 term=none cterm=none
  37. hi clear CursorColumn
  38. hi CursorColumn ctermbg=234
  39. hi LineNr ctermfg=237 ctermbg=233
  40. hi Visual term=bold cterm=italic
  41.  
  42. "indent guides
  43. let g:indent_guides_auto_colors = 0
  44. let g:indent_guides_guide_size = 1
  45. let g:indent_guides_start_level = 1
  46. hi IndentGuidesEven ctermbg=black
  47. hi IndentGuidesOdd ctermbg=grey
  48.  
  49. let mapleader = "," "Leader from \ to , - means stuff like Command-T plugin becomes ,+t rather than \+t
  50. set backupdir=~/.vim/tmp "Store backups in same dir
  51. set directory=~/.vim/tmp "Store swps in same dir
  52.  
  53. filetype plugin indent on "Detect filetype indentations
  54. "Custom filetypes
  55. au BufNewFile,BufRead *.ctp set filetype=html
  56. au BufNewFile,BufRead *.ui set filetype=ruby
  57. au BufNewFile,BufRead Fudgefile set filetype=ruby
  58.  
  59. "Tabs and traling space highlighting and sorting out - :retab sorts out tabs
  60. set list lcs=tab:·⁖,trail:ΒΆ
  61. "autocmd BufWritePre * :%s/\s\+$//e
  62.  
  63. "Emacs indenting
  64. map <Tab> ==
  65.  
  66. "NERDTree toggle
  67. map <c-T> :NERDTreeToggle<CR>
  68.  
  69. "Easy file switching
  70. nnoremap <leader>. <C-^>
  71.  
  72. "Ctrl-P fuzzy matching
  73. let g:ctrlp_map = '<leader><leader>'
  74. let g:ctrlp_working_path_mode = 0
  75.  
  76. :command! -range=% Snip '<,'>w! /tmp/snippet
  77. :command! Unsnip r /tmp/snippet
  78.  
  79. :command! Q qa!
  80. :command! WQ wqa!
  81.  
  82. " Get yankring out of the way
  83. let g:yankring_history_dir = '~/.vim/tmp'
Add Comment
Please, Sign In to add comment