Skip to content

Instantly share code, notes, and snippets.

@renatamarques97
Last active December 27, 2020 20:10
Show Gist options
  • Select an option

  • Save renatamarques97/cd2877f0c3ca1f610b0bade5ffdfc768 to your computer and use it in GitHub Desktop.

Select an option

Save renatamarques97/cd2877f0c3ca1f610b0bade5ffdfc768 to your computer and use it in GitHub Desktop.
set nocompatible " be iMproved, required
filetype off " required
set autoread
syntax on
set number
set backspace=indent,eol,start
set showcmd
set showmode
set visualbell
set autoindent
set smartindent
set smarttab
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
set laststatus=2
set statusline+=%f
set splitbelow
set splitright
set hlsearch
set wildmode=longest,list,full
set wildmenu
set clipboard=unnamedplus
if has('persistent_undo') && isdirectory(expand('~').'./.vim/backups')
silent !mkdir ~/.vim/backups/ > /dev/null 2>&1
set undodir = ~/.vim/backups
set undofile
endif
set list listchars=tab:\ \ ,trail:.
set tags=./tags;
set nowrap
" set linebreak
" 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'
Plugin 'sheerun/vim-polyglot'
Plugin 'scrooloose/syntastic.git'
Plugin 'mxw/vim-jsx'
Plugin 'jistr/vim-nerdtree-tabs.git'
Plugin 'scrooloose/nerdtree.git'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'JazzCore/ctrlp-cmatcher'
Plugin 'junegunn/fzf'
Plugin 'rking/ag.vim'
Plugin 'henrik/vim-indexed-search'
Plugin 'nelstrom/vim-visual-star-search'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'AndrewRadev/splitjoin.vim'
Plugin 'Raimondi/delimitMate'
" Plugin 'Shougo/deoplete.nvim.git'
Plugin 'godlygeek/tabular'
Plugin 'tomtom/tcomment_vim.git'
Plugin 'vim-scripts/matchit.zip.git'
Plugin 'Keithbsmiley/investigate.vim'
Plugin 'bogado/file-line.git'
Plugin 'skwp/YankRing.vim'
Plugin 'tpope/vim-endwise.git'
Plugin 'tpope/vim-surround.git'
Plugin 'vim-scripts/sudo.vim'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'elixir-editors/vim-elixir'
" Plugin 'StanAngeloff/php.vim'
Plugin 'tpope/vim-rails'
" Plugin 'garbas/vim-snipmate'
"Plugin 'thoughtbot/vim-rspec'
Plugin 'janko/vim-test'
" Plugin 'benmills/vimux'
Plugin 'jgdavey/tslime.vim'
Plugin 'BlakeWilliams/vim-pry'
Plugin 'isruslan/vim-es6'
Plugin 'Shougo/deoplete.nvim'
Plugin 'roxma/nvim-yarp'
Plugin 'roxma/vim-hug-neovim-rpc'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
set wildignore+=*/tmp/*,*.so,*.swp,*.zip
let g:ctrlp_map = '<c-f>'
let g:ctrlp_cmd = 'CtrlP'
if exists("+showtabline")
function! MyTabLine()
let s = ''
let wn = ''
let t = tabpagenr()
let i = 1
while i <= tabpagenr('$')
let buflist = tabpagebuflist(i)
let winnr = tabpagewinnr(i)
let s .= '%' . i . 'T'
let s .= (i == t ? '%1*' : '%2*')
let s .= ' '
let wn = tabpagewinnr(i,'$')
let s .= '%#TabNum#'
let s .= i
let s .= (i == t ? '%#TabLineSel#' : '%#TabLine#')
let bufnr = buflist[winnr - 1]
let file = bufname(bufnr)
let buftype = getbufvar(bufnr, 'buftype')
if buftype == 'nofile'
if file =~ '\/.'
let file = substitute(file, '.*\/\ze.', '', '')
endif
else
let file = fnamemodify(file, ':p:t')
endif
if file == ''
let file = '[No Name]'
endif
let s .= ' ' . file . ' '
let i = i + 1
endwhile
let s .= '%T%#TabLineFill#%='
let s .= (tabpagenr('$') > 1 ? '%999XX' : 'X')
return s
endfunction
set stal=2
set tabline=%!MyTabLine()
set showtabline=1
highlight link TabNum Special
endif
" Key Mappings
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
" Vim Test Settings
" let test#strategy = "vimux"
" let test#strategy = "tslime"
map <Leader>t :TestNearest<CR>
map <Leader>T :TestFile<CR>
map <Leader>a :TestSuite<CR>
map <Leader>l :TestLast<CR>
map <Leader>g :TestVisit<CR>
let test#ruby#rspec#executable = 'bundle exec rspec'
" Vim Pry Settings
nmap <leader>b :call pry#insert()<cr>
" CtrlP Settings
let g:ctrlp_max_files=0
let g:ctrlp_max_depth=15
" Deoplete settings
let g:deoplete#enable_at_startup = 1
" Auto saving VIM Folding when leaving and opening when opening the same file
" au BufWinLeave * mkview
" au BufWinEnter * silent loadview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment