Skip to content

Instantly share code, notes, and snippets.

@Salanoid
Last active July 23, 2022 12:01
Show Gist options
  • Save Salanoid/e97c9ef1d178e66a4c56025881d49afe to your computer and use it in GitHub Desktop.
Save Salanoid/e97c9ef1d178e66a4c56025881d49afe to your computer and use it in GitHub Desktop.
vimrc
" install ctags and run this in your root app folder to enable ctags -R --exclude=.git --exclude=log *
set nocompatible
set tabstop=2 softtabstop=2
set shiftwidth=2
set expandtab
set smartindent
set exrc
set guicursor=
set nu
set nohlsearch
set hidden
set noerrorbells
set nowrap
set noswapfile
set nobackup
set undodir=~/.vim/undodir
set undofile
set incsearch
set termguicolors
set scrolloff=8
set colorcolumn=80
set signcolumn=yes
set tags=tags,./tags
call plug#begin('~/.local/share/nvim/plugged')
Plug 'lifepillar/vim-solarized8'
Plug 'rust-lang/rust.vim'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-haml'
Plug 'nvim-lua/popup.nvim'
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'nvim-telescope/telescope-fzy-native.nvim'
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'ctrlpvim/ctrlp.vim'
Plug 'tpope/vim-fugitive'
Plug 'fatih/vim-go'
call plug#end()
" Enable syntax highlighting
syntax on
" Automatically remove all trailing whitespace
autocmd BufWritePre * %s/\s\+$//e
" Set default colorscheme to solarized
set background=dark
silent! colorscheme solarized8_high
let mapleader = " "
" Find files using Telescope command-line sugar.
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
" Mapping CtrlP command
nnoremap <Leader>b :<C-U>CtrlPBuffer<CR>
nnoremap <Leader>t :<C-U>CtrlP<CR>
nmap <Leader>g :NERDTreeToggle<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment