Skip to content

Instantly share code, notes, and snippets.

@psstoyanov
Created September 9, 2018 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psstoyanov/024a6a86b3385cc84dd112179cad7f33 to your computer and use it in GitHub Desktop.
Save psstoyanov/024a6a86b3385cc84dd112179cad7f33 to your computer and use it in GitHub Desktop.
vim settings
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" Set line numbers by default
set number
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
" Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}
" Use suggestions with YCM
Plugin 'Valloric/YouCompleteMe'
" Use better YCM config https://jonasdevlieghere.com/a-better-youcompleteme-config/
let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'
" Add Dracula theme
Plugin 'dracula/vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" Set the color scheme after all items have been loaded
colorscheme dracula
" FILE BROWSING:
" Tweaks for browsing
let g:netrw_banner=0 " disable bannaer
let g:netr_browse_split=4 " open in prior window
let g:netrw_altv=1 " open splits to the right
" let g:netrw_liststyle=3 " tree view
let g:netrw_winsize = 20 " default split width size in %
let g:netrw_list_hide=netrw_gitignore#Hide()
let g:netrw_list_hide.=',\(^\|\s\s)\zs\.\S\+'
augroup ProjectDrawer
autocmd!
autocmd VimEnter * :Vexplore
augroup END
" Tweaks for opening files:
function! OpenToRight()
:rightbelow vnew
:wincmd p
:normal P " use to open in the right split
endfunction
function! Netrw_mappings()
noremap V :call OpenToRight()<cr>
endfunction
" NOW WE CAN:
" - :edit a folder to open a file browser
" - <CR>/v/t to open in an h-split/v-split/tab
" - check |netrw-browse-maps| for more mappings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment