Guest User

Untitled

a guest
Jun 18th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. set nocompatible
  2.  
  3. " Helps force plugins to load correctly when it is turned back on below
  4. filetype off
  5.  
  6. " TODO: Load plugins here (pathogen or vundle)
  7.  
  8. " Vundle
  9. set rtp+=~/.vim/bundle/Vundle.vim
  10. call vundle#begin()
  11.  
  12. " Plugins managed by vundle
  13. Plugin 'VundleVim/Vundle.vim'
  14. Plugin 'scrooloose/nerdtree'
  15. Plugin 'nvie/vim-flake8'
  16. Plugin 'flazz/vim-colorschemes'
  17. Plugin 'pangloss/vim-javascript'
  18.  
  19. call vundle#end() " required
  20. filetype plugin indent on " required
  21.  
  22. " Turn on syntax highlighting
  23. syntax on
  24. highlight BadWhitespace ctermbg=red guibg=red
  25.  
  26. execute pathogen#infect()
  27.  
  28. " TODO: Pick a leader key
  29. let mapleader = " "
  30.  
  31. " Security
  32. set modelines=0
  33.  
  34. " Auto-toggle numbering modes
  35. :set number relativenumber
  36.  
  37. :augroup numbertoggle
  38. : autocmd!
  39. : autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
  40. : autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
  41. :augroup END
  42.  
  43. " Show file stats
  44. set ruler
  45.  
  46. " Blink cursor on error instead of beeping (grr)
  47. set visualbell
  48.  
  49. " Encoding
  50. set encoding=utf-8
  51.  
  52. " Whitespace
  53. "" set wrap
  54.  
  55. " Python, PEP-008
  56. au BufRead,BufNewFile *.py,*.pyw set expandtab
  57. au BufRead,BufNewFile *.py,*.pyw set textwidth=139
  58. au BufRead,BufNewFile *.py,*.pyw,*.html set tabstop=4
  59. au BufRead,BufNewFile *.py,*.pyw set softtabstop=4
  60. au BufRead,BufNewFile *.py,*.pyw,*.html set shiftwidth=4
  61. au BufRead,BufNewFile *.py,*.pyw set autoindent
  62. au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /^\t\+/
  63. au BufRead,BufNewFile *.py,*.pyw match BadWhitespace /\s\+$/
  64. au BufNewFile *.py,*.pyw set fileformat=unix
  65. au BufRead,BufNewFile *.py,*.pyw let b:comment_leader = '#'
  66.  
  67. " html, yaml
  68. au BufRead,BufNewFile *.html,*.yaml set autoindent
  69. au BufRead,BufNewFile *.html,*.yaml set cindent
  70. au BufRead,BufNewFile *.html,*.yaml set tabstop=4
  71. au BufRead,BufNewFile *.html,*.yaml set shiftwidth=2
  72.  
  73. " javascript
  74. let g:jsx_ext_required = 1
  75.  
  76. " Cursor motion
  77. set scrolloff=3
  78. set backspace=indent,eol,start
  79. set matchpairs+=<:> " use % to jump between pairs
  80. runtime! macros/matchit.vim
  81.  
  82. " Move up/down editor lines
  83. nnoremap j gj
  84. nnoremap k gk
  85.  
  86. " Allow hidden buffers
  87. set hidden
  88.  
  89. " Rendering
  90. set ttyfast
  91.  
  92. " Status bar
  93. set laststatus=2
  94.  
  95. " Last line
  96. set showmode
  97. set showcmd
  98.  
  99. " Searching
  100. nnoremap / /\v
  101. vnoremap / /\v
  102. set hlsearch
  103. set incsearch
  104. set ignorecase
  105. set smartcase
  106. set showmatch
  107. map <leader><space> :let @/=''<cr> " clear search
  108.  
  109. " Remap help key.
  110. inoremap <F1> <ESC>:set invfullscreen<CR>a
  111. nnoremap <F1> :set invfullscreen<CR>
  112. vnoremap <F1> :set invfullscreen<CR>
  113.  
  114. " Easier esc key
  115. imap ` <Esc>
  116.  
  117. " Textmate holdouts
  118.  
  119. " Formatting
  120. map <leader>q gqip
  121.  
  122. " Visualize tabs and newlines
  123. set listchars=tab:▸\ ,eol:¬
  124. " Uncomment this to enable by default:
  125. " set list " To enable by default
  126. " Or use your leader key + l to toggle on/off
  127. map <leader>l :set list!<CR> " Toggle tabs and EOL
  128.  
  129. let g:ycm_server_keep_logfiles = 1
  130. let g:ycm_server_log_level = 'debug'
  131.  
  132. " Color scheme (terminal)
  133. set t_Co=256
  134. set background=dark
  135. colorscheme apprentice
  136. highlight Normal ctermbg=NONE
  137. highlight nonText ctermbg=NONE
Add Comment
Please, Sign In to add comment