Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. set nocompatible " be iMproved, required
  2. filetype off " required
  3.  
  4. " set the runtime path to include Vundle and initialize
  5. set rtp+=~/.vim/bundle/Vundle.vim
  6. set rtp+=~/.vim/bundle/vundle/
  7. call vundle#begin()
  8. " alternatively, pass a path where Vundle should install plugins
  9. "call vundle#begin('~/some/path/here')
  10.  
  11. " let Vundle manage Vundle, required
  12. Plugin 'VundleVim/Vundle.vim'
  13. " Plugin 'vim-scripts/android.vim'
  14. Plugin 'davidhalter/jedi-vim'
  15. Plugin 'Valloric/YouCompleteMe'
  16. Plugin 'tpope/vim-fugitive'
  17. Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
  18. Plugin 'scrooloose/nerdtree'
  19.  
  20. " All of your Plugins must be added before the following line
  21. call vundle#end() " required
  22. filetype plugin indent on " required
  23. execute pathogen#infect()
  24. syntax on
  25. set laststatus=2
  26. set shiftwidth=4
  27. set expandtab
  28. set hlsearch
  29. set incsearch
  30. set tabstop=4
  31. set scrolloff=3
  32. set number
  33. set showcmd
  34. set lines=24 columns=80
  35. set splitright
  36. set backspace=indent,eol,start
  37. colorscheme slate
  38. map Y y$
  39.  
  40. " Jedi displays function call signatures in insert mode in real-time
  41. " highlighting the current argument. The call signatures can be displayed as
  42. " a pop-up in the buffer (set to 1, the default), which has the advantage of
  43. " being easier to refer to, or in Vim's command line aligned with
  44. " the function call (set to 2), which can improve the integrity of Vim's
  45. " undo history.
  46. let g:jedi#show_call_signatures = "1"
  47. let g:jedi#show_call_signatures_delay = "0"
  48. let g:jedi#goto_command = "<leader>g"
  49. let g:jedi#goto_assignments_command = ""
  50. let g:jedi#goto_definitions_command = ""
  51. let g:jedi#documentation_command = "K"
  52. let g:jedi#usages_command = "<leader>u"
  53. let g:jedi#completions_command = "<C-Space>"
  54. let g:jedi#rename_command = "<leader>r"
  55. let g:jedi#completions_enabled = "1"
  56.  
  57. " YouCompleteMe settings
  58. let g:ycm_confirm_extra_conf = 0
  59. let g:ycm_server_log_level = 'warning'
  60. let g:ycm_server_use_vim_stdout = 0
  61. let g:ycm_server_keep_logfiles = 1
  62. let g:ycm_path_to_python_interpreter = '/usr/bin/python3'
  63. let g:ycm_enable_diagnostic_signs = 0
  64. let g:ycm_enable_diagnostic_highlighting = 0
  65. let g:ycm_key_list_select_completion = ['<Down>']
  66. let g:ycm_key_list_previous_completion = ['<Up>']
  67. " let g:ycm_show_diagnostics_ui = 0
  68.  
  69. " NERDTree
  70. let NERDTreeIgnore = ['.o', '~$']
  71.  
  72. " hy
  73. let g:hy_enable_conceal = 1
  74. setlocal concealcursor=n
  75.  
  76. " avoid mispress of <SHIFT> when writing and quiting
  77. com -nargs=0 Q q
  78. com -nargs=0 W w
  79. com -nargs=0 Wq wq
  80. com -nargs=0 Wqa wqa
  81.  
  82. " copy every thing in the file into clipboard
  83. com -nargs=0 CpAll :norm ggVG"+y
  84.  
  85. " Clear done items in TODO
  86. com -nargs=0 TODOClear :g/[x]/ norm dd
  87. com -nargs=0 TODODown :g/[x]/ norm ddGp
  88.  
  89. " Remove trailing space
  90. com -nargs=0 Rmspace :%s/s*$// | norm
  91.  
  92. " mksession command
  93. com -nargs=1 Mks :mksession! ~/.vim/<args>.vim
  94. com -nargs=1 Delsession :!rm ~/.vim/<args>.vim
  95.  
  96. " edit this file command
  97. com -nargs=0 Vimrc :split ~/.vimrc
  98.  
  99. " Goto the TODO file
  100. com -nargs=0 TODO :split ~/Desktop/TODO
  101.  
  102. " ConqueTerm shortened
  103. com -nargs=0 Shell :ConqueTerm bash
  104. com -nargs=0 Python :ConqueTerm python3
  105.  
  106. " Jedi command
  107. com -nargs=0 Jedi :call Jedi()
  108.  
  109. autocmd BufRead * call Answer()
  110. autocmd BufRead TODO set syntax=TODO
  111. autocmd BufRead *.ss set filetype=ss
  112. autocmd FileType python call Jedi()
  113.  
  114. function Jedi()
  115. set omnifunc=jedi#completions
  116. set completefunc=jedi#completions
  117. endfunction
  118.  
  119. function Answer()
  120. if getline(1) =~? '.*answer.*'
  121. " || expand("%:t") =~? '.*answer[^.]*>'
  122. set syntax=answer
  123. endif
  124. endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement