Advertisement
Guest User

Untitled

a guest
Aug 1st, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 7.96 KB | None | 0 0
  1.  
  2. " set the runtime path to include Vundle and initialize
  3. set rtp+=~/.vim/bundle/Vundle.vim
  4. call plug#begin('~/.vim/plugged')
  5.  
  6. " Make sure you use single quotes
  7.  
  8. " Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
  9. Plug 'junegunn/vim-easy-align'
  10.  
  11. " Any valid git URL is allowed
  12. Plug 'https://github.com/junegunn/vim-github-dashboard.git'
  13.  
  14. " Multiple Plug commands can be written in a single line using | separators
  15. Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
  16. Plug '/usr/local/opt/fzf'
  17. Plug 'junegunn/fzf.vim'
  18.  
  19. " On-demand loading
  20. Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
  21. Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
  22.  
  23. " Using a non-master branch
  24. Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
  25.  
  26. " Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
  27. Plug 'fatih/vim-go', { 'tag': '*' }
  28.  
  29. " Plugin options
  30. Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
  31.  
  32. " Plugin outside ~/.vim/plugged with post-update hook
  33. Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
  34.  
  35. " Unmanaged plugin (manually installed and updated)
  36. Plug '~/my-prototype-plugin'
  37.  
  38.  
  39. " If you don't have nodejs and yarn
  40. " use pre build
  41. Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }}
  42.  
  43. " Initialize plugin system
  44. call plug#end()
  45. call vundle#begin()
  46. " alternatively, pass a path where Vundle should install plugins
  47. "call vundle#begin('~/some/path/here')
  48.  
  49. " let Vundle manage Vundle, required
  50.  
  51. Plugin 'VundleVim/Vundle.vim'
  52. Plugin 'bfrg/vim-cpp-modern'
  53. Plugin 'sheerun/vim-polyglot'
  54. Plugin 'AlessandroYorba/Sierra'
  55. " Track the engine.
  56. Plugin 'SirVer/ultisnips'
  57.  
  58. " The following are examples of different formats supported.
  59. " Keep Plugin commands between vundle#begin/end.
  60. " plugin on GitHub repo
  61. Plugin 'tpope/vim-fugitive'
  62. Plugin 'joshdick/onedark.vim'
  63. " plugin from http://vim-scripts.org/vim/scripts.html
  64. " Plugin 'L9'
  65. " Git plugin not hosted on GitHub
  66. "Plugin 'git://git.wincent.com/command-t.git'
  67. Plugin 'kristijanhusak/vim-hybrid-material'
  68. Plugin 'vim-airline/vim-airline'
  69. Plugin 'vim-airline/vim-airline-themes'
  70. Plugin 'plasticboy/vim-markdown'
  71. Plugin 'godlygeek/tabular'
  72. Plugin 'whatyouhide/vim-gotham'
  73. Plugin 'iamcco/markdown-preview.nvim'
  74. Plugin 'danilo-augusto/vim-afterglow'
  75. " git repos on your local machine (i.e. when working on your own plugin)
  76. "Plugin 'file:///home/gmarik/path/to/plugin'
  77. " The sparkup vim script is in a subdirectory of this repo called vim.
  78. " Pass the path to set the runtimepath properly.
  79. Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
  80. " Install L9 and avoid a Naming conflict if you've already installed a
  81. " different version somewhere else.
  82. " Plugin 'ascenator/L9', {'name': 'newL9'}
  83.  
  84. " All of your Plugins must be added before the following line
  85. call vundle#end()            " required
  86. filetype plugin indent on    " required
  87. " To ignore plugin indent changes, instead use:
  88. "filetype plugin on
  89. "
  90. " Brief help
  91. " :PluginList       - lists configured plugins
  92. " :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
  93. " :PluginSearch foo - searches for foo; append `!` to refresh local cache
  94. " :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
  95. "
  96. " see :h vundle for more details or wiki for FAQ
  97. " Put your non-Plugin stuff after this line
  98.  
  99. syntax on "to color the file
  100. set number "to show line numbers
  101. set background=light
  102.  
  103. " another beautiful dark theme
  104. "let g:sierra_Pitch = 1
  105. "colorscheme sierra
  106.  
  107. colorscheme afterglow
  108. let g:airline_theme='afterglow'
  109.  
  110. $ "for open file starting always from the end
  111. set history=999
  112. set cursorline
  113. set showmode
  114. set showcmd
  115. set showmatch
  116. set splitbelow splitright
  117. set title
  118. set scrolloff=5             " Start scrolling n lines before horizontal
  119.                             "   border of window.
  120. set sidescrolloff=7         " Start scrolling n chars before end of screen.
  121. set sidescroll=1            " The minimal number of columns to scroll
  122.  
  123.  
  124. " add useful stuff to title bar (file name, flags, cwd)
  125. " based on @factorylabs
  126. if has('title') && (has('gui_running') || &title)
  127.     set titlestring=
  128.     set titlestring+=%f
  129.     set titlestring+=%h%m%r%w
  130.     set titlestring+=\ -\ %{v:progname}
  131.     set titlestring+=\ -\ %{substitute(getcwd(),\ $HOME,\ '~',\ '')}
  132. endif
  133.  
  134. " --- command completion ---
  135. set wildmenu                " Hitting TAB in command mode will
  136. set wildchar=<TAB>          "   show possible completions.
  137. set wildmode=list:longest
  138. set wildignore+=*.DS_STORE,*.db
  139.  
  140. " --- diff ---
  141. set diffopt=filler          " Add vertical spaces to keep right
  142.                             "   and left aligned.
  143. set diffopt+=iwhite         " Ignore whitespace changes.
  144.  
  145. " --- folding---
  146. set foldmethod=indent       "fold based on indent
  147. set foldnestmax=3           "deepest fold is 3 levels
  148. set nofoldenable            "don't fold by default
  149.  
  150. set visualbell
  151.  
  152. " -----------------------------------------------------------------------------
  153. " INDENTATION AND TEXT-WRAP
  154. " -----------------------------------------------------------------------------
  155.  
  156. set expandtab                   " Expand tabs to spaces
  157. set autoindent smartindent      " auto/smart indent
  158. set copyindent                  " copy previous indentation on auto indent
  159. set softtabstop=4               " Tab key results in # spaces
  160. set tabstop=4                   " Tab is 4 spaces
  161. set shiftwidth=4                " The # of spaces for indenting.
  162. set smarttab                    " At start of line, <Tab> inserts shift width
  163.                                 "   spaces, <Bs> deletes shift width spaces.
  164.  
  165. set wrap                        " wrap lines
  166. set textwidth=79
  167. "set colorcolumn=+1              " Show large lines
  168. set formatoptions=qrn1          " automatic formating.
  169. set formatoptions-=o            " don't start new lines w/ comment leader on
  170.                                 "   pressing 'o'
  171.  
  172. set nomodeline                  " don't use modeline (security)
  173.  
  174. set pastetoggle=<leader>p       " paste mode: avoid auto indent, treat chars
  175.                                 "   as literal.
  176. " -----------------------------------------------------------------------------
  177. " PLUGINS
  178. " -----------------------------------------------------------------------------
  179.  
  180. " --- NERDTree ----
  181. let NERDTreeIgnore=['.DS_Store']
  182. let NERDTreeShowBookmarks=1         "show bookmarks on startup
  183. let NERDTreeHighlightCursorline=1   "Highlight the selected entry in the tree
  184. map <leader>nt :NERDTreeToggle<CR>
  185.  
  186.  
  187. " --- NERDCommenter ---
  188.  
  189. let NERDSpaceDelims=1               " space around delimiters
  190. let NERDRemoveExtraSpaces=1
  191.  
  192.  
  193. " --- FIX/IMPROVE DEFAULT BEHAVIOR ---
  194.  
  195. " faster commands
  196. nnoremap <space> :
  197. nnoremap ; :
  198.  
  199.  
  200.  
  201.  
  202. " --- search / regexp ---
  203. set gdefault                " RegExp global by default
  204. set magic                   " Enable extended regexes.
  205. set hlsearch                " highlight searches
  206. set incsearch               " show the `best match so far' astyped
  207. set ignorecase smartcase    " make searches case-insensitive, unless they
  208.                             "   contain upper-case letters
  209.                             "
  210. "map ; _Files<CR>
  211. nnoremap f<CR> :Files<CR>
  212. nnoremap s :Snippets<CR>
  213. nnoremap fo<CR> gg=G
  214.  
  215. execute pathogen#infect()
  216. call pathogen#helptags()
  217.  
  218. " for vim nerd -- the lateral bar for files
  219. autocmd StdinReadPre * let s:std_in=1
  220. autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
  221. autocmd StdinReadPre * let s:std_in=1
  222. autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
  223. let g:NERDTreeDirArrowExpandable = '▸'
  224. let g:NERDTreeDirArrowCollapsible = '▾'
  225.  
  226.  
  227. "workaround error of curvy brackets VIM-CPP-MODERN
  228. let c_no_curly_error = 1
  229.  
  230. " Set ultisnips triggers
  231. let g:UltiSnipsExpandTrigger="<tab>"
  232. let g:UltiSnipsJumpForwardTrigger="<tab>"
  233. let g:UltiSnipsJumpBackwardTrigger="<s-tab>"
  234.  set textwidth=0
  235.  set clipboard=unnamed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement