Advertisement
Guest User

Julia's vim

a guest
Sep 10th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 11.08 KB | None | 0 0
  1.  
  2. " All system-wide defaults are set in $VIMRUNTIME/debian.vim and sourced by
  3. " the call to :runtime you can find below.  If you wish to change any of those
  4. " settings, you should do it in this file (/etc/vim/vimrc), since debian.vim
  5. " will be overwritten everytime an upgrade of the vim packages is performed.
  6. " It is recommended to make changes after sourcing debian.vim since it alters
  7. " the value of the 'compatible' option.
  8.  
  9. " This line should not be removed as it ensures that various options are
  10. " properly set to work with the Vim-related packages available in Debian.
  11. runtime! debian.vim
  12.  
  13. " Uncomment the next line to make Vim more Vi-compatible
  14. " NOTE: debian.vim sets 'nocompatible'.  Setting 'compatible' changes numerous
  15. " options, so any other options should be set AFTER setting 'compatible'.
  16. "set compatible
  17.  
  18. " Vim5 and later versions support syntax highlighting. Uncommenting the next
  19. " line enables syntax highlighting by default.
  20. if has("syntax")
  21.   syntax on
  22. endif
  23.  
  24. " If using a dark background within the editing area and syntax highlighting
  25. " turn on this option as well
  26. "set background=dark
  27.  
  28. " Uncomment the following to have Vim jump to the last position when
  29. " reopening a file
  30. "if has("autocmd")
  31. "  au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
  32. "endif
  33.  
  34. " Uncomment the following to have Vim load indentation rules and plugins
  35. " according to the detected filetype.
  36. "if has("autocmd")
  37. "  filetype plugin indent on
  38. "endif
  39.  
  40. " The following are commented out as they cause vim to behave a lot
  41. " differently from regular Vi. They are highly recommended though.
  42. "set showcmd        " Show (partial) command in status line.
  43. "set showmatch        " Show matching brackets.
  44. "set ignorecase        " Do case insensitive matching
  45. "set smartcase        " Do smart case matching
  46. "set incsearch        " Incremental search
  47. "set autowrite        " Automatically save before commands like :next and :make
  48. "set hidden        " Hide buffers when they are abandoned
  49. "set mouse=a        " Enable mouse usage (all modes)
  50.  
  51. " Source a global configuration file if available
  52. if filereadable("/etc/vim/vimrc.local")
  53.   source /etc/vim/vimrc.local
  54. endif
  55.  
  56.  
  57. " Copyright© Meindert Nennhuber 2011-2018. All rights reserved.
  58. " set nocompatible              " be iMproved, required
  59. " filetype plugin on            " required
  60. " set the runtime path to include Vundle and initialize
  61.  
  62.  
  63. set runtimepath^=~/.vim/bundle/vim-airline
  64.  set rtp+=~/.vim/bundle/Vundle.vim
  65.  call vundle#begin()
  66. " let Vundle manage Vundle, required
  67.  Plugin 'VundleVim/Vundle.vim'
  68. " " plugin on GitHub repo
  69.  Plugin 'tpope/vim-fugitive'
  70.  Plugin 'tpope/vim-unimpaired'
  71. " " expand condensed HTML
  72.  Plugin 'rstacruz/sparkup'
  73. " " color scheme
  74. Plugin 'morhetz/gruvbox'
  75. " " status bar
  76. Plugin 'vim-airline/vim-airline'
  77. Plugin 'vim-airline/vim-airline-themes'
  78. " " MySQL
  79. Plugin 'NLKNguyen/pipe.vim'
  80. Plugin 'NLKNguyen/pipe-mysql.vim'
  81.  Plugin 'mustache/vim-mustache-handlebars'
  82. " " Plugin 'ctrlp.vim'
  83.  Plugin 'ctrlpvim/ctrlp.vim'
  84.  Plugin 'Yggdroot/indentLine'
  85.  Plugin 'airblade/vim-gitgutter'
  86.  Plugin 'scrooloose/nerdtree'
  87.  Plugin 'Xuyuanp/nerdtree-git-plugin'
  88.  Plugin 'tiagofumo/vim-nerdtree-syntax-highlight'
  89.  Plugin 'jwalton512/vim-blade'
  90.  Plugin 'ap/vim-css-color'
  91.  Plugin 'Syntastic'
  92.  Plugin 'yegappan/greplace'
  93.  Plugin 'sessionman.vim'
  94.  Plugin 'mattn/emmet-vim'
  95.  Plugin 'majutsushi/tagbar'
  96.  Plugin 'ryanoasis/vim-devicons'
  97. " c
  98. Plugin 'vim-scripts/c.vim', {'for': ['c', 'cpp']}
  99. Plugin 'ludwig/split-manpage.vim'
  100. " html
  101. "" HTML Bundle
  102. Plugin 'hail2u/vim-css3-syntax'
  103. Plugin 'gorodinskiy/vim-coloresque'
  104. Plugin 'tpope/vim-haml'
  105. " javascript
  106. "" Javascript Bundle
  107. Plugin 'jelera/vim-javascript-syntax'
  108. " php
  109. "" PHP Bundle
  110. Plugin 'arnaud-lb/vim-php-namespace'
  111. " python
  112. "" Python Bundle
  113. Plugin 'davidhalter/jedi-vim'
  114. Plugin 'raimon49/requirements.txt.vim', {'for': 'requirements'}
  115. " " ------------------Barra separadora -----------
  116.  call vundle#end()
  117.  let g:airline#extensions#tabline#enabled = 1
  118.  let g:syntastic_always_populate_loc_list = 1
  119.  let g:syntastic_auto_loc_list = 1
  120.  let g:syntastic_check_on_open = 1
  121.  let g:syntastic_check_on_wq = 0
  122.  let g:statline_syntastic = 0
  123.  let g:syntastic_javascript_checkers = ['eslint']
  124.  " ctrlp glyphs
  125.  let g:webdevicons_enable_ctrlp = 1
  126.  let g:WebDevIconsUnicodeDecorateFolderNodes = 1
  127.  let g:WebDevIconsNerdTreeGitPluginForceVAlign = 1
  128.  let g:airline_powerline_fonts = 1
  129.  let g:NERDTreeFileExtensionHighlightFullName = 1
  130.  let g:NERDTreeExactMatchHighlightFullName = 1
  131.  let g:NERDTreePatternMatchHighlightFullName = 1
  132.  highlight Directory guifg=#aaaaaa ctermfg=white
  133.  let mapleader=","
  134.  syntax on
  135.  set nowrap
  136.  set tabstop=2
  137.  set softtabstop=2
  138.  set shiftwidth=2
  139.  set expandtab
  140.  set smarttab
  141.  set autoindent
  142.  set incsearch
  143.  set hlsearch
  144.  set ignorecase
  145.  set wrapscan
  146.  set wildmenu
  147.  set list listchars=tab:\ \ ,trail:·
  148.  set number
  149.  set backspace=2 " make backspace work like most other programs
  150.  
  151.  set clipboard=unnamedplus
  152.  set noeb vb t_vb=
  153.  highlight OverLength ctermbg=red ctermfg=white guibg=#592929
  154.  match OverLength /%81v.+/
  155.  highlight Directory guifg=#7f7f7f ctermfg=white
  156.  set runtimepath^=~/.vim/bundle/ctrlp.vim
  157.  set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Nerd\ Font\ Complete\ 12
  158.  set encoding=utf8
  159.  if executable('ag')
  160. "   " Use Ag over Grep
  161.    set grepprg=ag\ --nogroup\ --nocolor
  162. "       " Use ag in CtrlP for listing files. Lightning fast and respects
  163. "       .gitignore
  164.      let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""
  165. --path-to-ignore ~/.agingore'
  166.   let g:ctrlp_max_files=0
  167.     " let g:ctrlp_max_depth=40
  168.  endif
  169.     " " let g:ctrlp_custom_ignore = '(.(git|hg|svn))|(build|vendor|node_modules)'
  170.  augroup filetypedetect
  171.  au BufRead,BufNewFile *.blade.php set filetype=blade
  172.  augroup END
  173.     "   " Open NERD tree with Ctrl+`
  174.  nmap <F1> :NERDTreeToggle<CR>
  175.     "   " Open Tagbar with F2
  176.    nmap <F2> :TagbarToggle<CR>
  177.     "   " silent! so .vimrc
  178.    if exists("g:loaded_webdevicons")
  179.      call webdevicons#refresh()
  180.    endif
  181. nnoremap <C-y> "+y
  182. vnoremap <C-y> "+y
  183.  
  184. set background=dark
  185. colorscheme atom-dark-256
  186. ""hi Normal guibg=NONE guifg=NONE ctermbg=NONE ctermfg=NONE
  187.  
  188.  
  189.  
  190.  
  191. "" Git
  192. noremap <Leader>ga :Gwrite<CR>
  193. noremap <Leader>gc :Gcommit<CR>
  194. noremap <Leader>gsh :Gpush<CR>
  195. noremap <Leader>gll :Gpull<CR>
  196. noremap <Leader>gs :Gstatus<CR>
  197. noremap <Leader>gb :Gblame<CR>
  198. noremap <Leader>gd :Gvdiff<CR>
  199. noremap <Leader>gr :Gremove<CR>
  200.  
  201.  
  202. " c
  203. autocmd FileType c setlocal tabstop=4 shiftwidth=4 expandtab
  204. autocmd FileType cpp setlocal tabstop=4 shiftwidth=4 expandtab
  205.  
  206.  
  207. " html
  208. " for html files, 2 spaces
  209. autocmd Filetype html setlocal ts=2 sw=2 expandtab
  210.  
  211.  
  212. " javascript
  213. let g:javascript_enable_domhtmlcss = 1
  214.  
  215. " vim-javascript
  216. augroup vimrc-javascript
  217.   autocmd!
  218.   autocmd FileType javascript set tabstop=4|set shiftwidth=4|set expandtab softtabstop=4
  219. augroup END
  220.  
  221.  
  222. " php
  223.  
  224.  
  225. " python
  226. " vim-python
  227. augroup vimrc-python
  228.   autocmd!
  229.   autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=8 colorcolumn=79
  230.       \ formatoptions+=croq softtabstop=4
  231.       \ cinwords=if,elif,else,for,while,try,except,finally,def,class,with
  232. augroup END
  233.  
  234. " jedi-vim
  235. let g:jedi#popup_on_dot = 0
  236. let g:jedi#goto_assignments_command = "<leader>g"
  237. let g:jedi#goto_definitions_command = "<leader>d"
  238. let g:jedi#documentation_command = "K"
  239. let g:jedi#usages_command = "<leader>n"
  240. let g:jedi#rename_command = "<leader>r"
  241. let g:jedi#show_call_signatures = "0"
  242. let g:jedi#completions_command = "<C-Space>"
  243. let g:jedi#smart_auto_mappings = 0
  244.  
  245. " syntastic
  246. let g:syntastic_python_checkers=['python', 'flake8']
  247.  
  248. " vim-airline
  249. let g:airline#extensions#virtualenv#enabled = 1
  250.  
  251. " Syntax highlight
  252. " Default highlight is better than polyglot
  253. let g:polyglot_disabled = ['python']
  254. let python_highlight_all = 1
  255.  
  256.  
  257. autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
  258. autocmd FileType css set omnifunc=csscomplete#CompleteCSS
  259. autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
  260.  
  261. :set mouse=n
  262. :set ttymouse=xterm2
  263. let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf.py"
  264.  
  265.  
  266.     "____        _                  _
  267.  ""/ ___| _ __ (_)_ __  _ __   ___| |_ ___
  268.  "\_  __ \| '_ \| | '_ \| '_ \ / _ \ __/ __|
  269.  " "___ ) | | | | | |_) | |_) |  __/ |_\__ \
  270.  " "|____/|_| |_|_| .__/| .__/ \___|\__|___/
  271.  "               "|_|   |_|
  272.  "
  273.  ""LATEX
  274. " Code snippets
  275.  
  276. autocmd FileType tex inoremap ,exe \begin{exe}<Enter>\ex<Space><Enter>\end{exe}<Enter><Enter><++><Esc>3kA
  277. autocmd FileType tex inoremap ,em \emph{}<++><Esc>T{i
  278. autocmd FileType tex vnoremap , <ESC>`<i\{<ESC>`>2la}<ESC>?\\{<Enter>a
  279. autocmd FileType tex inoremap ,bf \textbf{}<++><Esc>T{i
  280. autocmd FileType tex inoremap ,it \textit{}<++><Esc>T{i
  281. autocmd FileType tex inoremap ,ct \textcite{}<++><Esc>T{i
  282. autocmd FileType tex inoremap ,cp \parencite{}<++><Esc>T{i
  283. autocmd FileType tex inoremap ,glos {\gll<Space><++><Space>\\<Enter><++><Space>\\<Enter>\trans{``<++>''}}<Esc>2k2bcw
  284. autocmd FileType tex inoremap ,x \begin{xlist}<Enter>\ex<Space><Enter>\end{xlist}<Esc>kA<Space>
  285. autocmd FileType tex inoremap ,ol \begin{enumerate}<Enter><Enter>\end{enumerate}<Enter><Enter><++><Esc>3kA\item<Space>
  286. autocmd FileType tex inoremap ,ul \begin{itemize}<Enter><Enter>\end{itemize}<Enter><Enter><++><Esc>3kA\item<Space>
  287. autocmd FileType tex inoremap ,li <Enter>\item<Space>
  288. autocmd FileType tex inoremap ,ref \ref{}<Space>(<>)<Esc>T{i
  289. autocmd FileType tex inoremap ,tab \begin{tabular}<Enter><++><Enter>\end{tabular}<Enter><Enter><++><Esc>4kA{}<Esc>i
  290. autocmd FileType tex inoremap ,ot \begin{tableau}<Enter>\inp{<++>}<Tab>\const{<++>}<Tab><++><Enter><++><Enter>\end{tableau}<Enter><Enter><++><Esc>5kA{}<Esc>i
  291. autocmd FileType tex inoremap ,can \cand{}<Tab><++><Esc>T{i
  292. autocmd FileType tex inoremap ,con \const{}<Tab><++><Esc>T{i
  293. autocmd FileType tex inoremap ,v \vio{}<Tab><++><Esc>T{i
  294. autocmd FileType tex inoremap ,a \href{}{<++>}<Space><++><Esc>2T{i
  295. autocmd FileType tex inoremap ,sc \textsc{}<Space><++><Esc>T{i
  296. autocmd FileType tex inoremap ,chap \chapter{}<Enter><Enter><++><Esc>2kf}i
  297. autocmd FileType tex inoremap ,sec \section{}<Enter><Enter><++><Esc>2kf}i
  298. autocmd FileType tex inoremap ,ssec \subsection{}<Enter><Enter><++><Esc>2kf}i
  299. autocmd FileType tex inoremap ,sssec \subsubsection{}<Enter><Enter><++><Esc>2kf}i
  300. autocmd FileType tex inoremap ,st <Esc>F{i*<Esc>f}i
  301. autocmd FileType tex inoremap ,beg \begin{DELRN}<Enter><++><Enter>\end{DELRN}<Enter><Enter><++><Esc>4k0fR:MultipleCursorsFind<Space>DELRN<Enter>c
  302. autocmd FileType tex inoremap ,up <Esc>/usepackage<Enter>o\usepackage{}<Esc>i
  303. autocmd FileType tex nnoremap ,up /usepackage<Enter>o\usepackage{}<Esc>i
  304. autocmd FileType tex inoremap ,tt \texttt{}<Space><++><Esc>T{i
  305. autocmd FileType tex inoremap ,bt {\blindtext}
  306. autocmd FileType tex inoremap ,nu $\varnothing$
  307. autocmd FileType tex inoremap ,col \begin{columns}[T]<Enter>\begin{column}{.5\textwidth}<Enter><Enter>\end{column}<Enter>\begin{column}{.5\textwidth}<Enter><++><Enter>\end{column}<Enter>\end{columns}<Esc>5kA
  308. autocmd FileType tex inoremap ,rn (\ref{})<++><Esc>F}i
  309.  
  310. ""Latex Config
  311. let g:tex_conceal = ""
  312. let g:tex_flavor='latex'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement