Skip to content

Instantly share code, notes, and snippets.

@jacobcvt12
Created Apr 13, 2018
Embed
What would you like to do?
" -----------------------------------------------------------
"
" Description: .vimrc file (vim configurations)
" Maintainer: Jacob Carey <jacobcvt12@gmail.com>
"
" -----------------------------------------------------------
" 1. General Settings {{{1
" enable hybrid rnu
set relativenumber
set number
" 2. General Keyboard Mappings {{{1
" enable tab navigation
nnoremap <C-n> :tabnew<CR>:NERDTreeToggle<CR>
nnoremap <C-j> :tabnext<CR>
nnoremap <C-k> :tabprev<CR>
" map <Esc> to exit terminal-mode
tnoremap <Esc> <C-\><C-n>
" use comma as leader and "\" as localleader
let mapleader = ","
let maplocalleader = "\\"
" change tabstop
set tabstop=4
set shiftwidth=4
set expandtab
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set cursorline " highlight current line
set foldenable " enable folding
set foldmethod=marker " fold based on indent level
set foldlevelstart=10 " open most folds by default
set modelines=1 " check for vim settings on last line
set autochdir " change directory to that of current file
" Quickly edit/reload the vimrc file
nnoremap <silent> <leader>ev :tabnew<CR>:e $MYVIMRC<CR>
nnoremap <silent> <leader>sv :so $MYVIMRC<CR>
" close NERDTree on file open
let NERDTreeQuitOnOpen = 1
" 3. vim-plug {{{1
call plug#begin('C:\Users\jcarey\AppData\Local\nvim\plugged')
" libraries
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'scrooloose/nerdcommenter'
Plug 'kien/ctrlp.vim'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-unimpaired'
Plug 'airblade/vim-gitgutter'
" Julia
Plug 'JuliaEditorSupport/julia-vim'
" R
Plug 'jalvesaq/Nvim-R'
" Stan
Plug 'mdlerch/mc-stan.vim'
" Silver searcher
Plug 'rking/ag.vim'
" color schemes
Plug 'AlessandroYorba/Alduin'
call plug#end()
colorscheme alduin
" 4. Git Settings {{{1
nnoremap <leader>gs :Gstatus<CR>
nnoremap <leader>gl :Glog<CR>
nnoremap <leader>gc :Git checkout<Space>
nnoremap <leader>gps :Gpush origin master
nnoremap <leader>gpl :Gpull origin master
" 5. R Settings {{{1
let R_path = "C:\Users\jcarey\Documents\R\R-3.3.1\bin\x64"
" 6. Silver Search Settings {{{1
nnoremap <leader>a :Ag!<Space>
let g:ag_working_path_mode="r"
" 7. Shell {{{1
command! -bang Terminal terminal<bang> C:\Users\jcarey\AppData\Local\Programs\Git\bin\bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment