Skip to content

Instantly share code, notes, and snippets.

@JeffreyWay

JeffreyWay/.vimrc Secret

Last active Feb 26, 2021
Embed
What would you like to do?
set nocompatible "We want the latest Vim settings/options.
so ~/.vim/plugins.vim
syntax enable
set backspace=indent,eol,start "Make backspace behave like every other editor.
let mapleader = ',' "The default is \, but a comma is much better.
set number "Let's activate line numbers.
"-------------Visuals--------------"
colorscheme atom-dark
set t_CO=256 "Use 256 colors. This is useful for Terminal Vim.
set guifont=Fira_Code:h17 "Set the default font family and size.
set linespace=15 "Macvim-specific line-height.
set guioptions-=l "Disable Gui scrollbars.
set guioptions-=L
set guioptions-=r
set guioptions-=R
"-------------Search--------------"
set hlsearch "Highlight all matched terms.
set incsearch "Incrementally highlight, as we type.
"-------------Split Management--------------"
set splitbelow "Make splits default to below...
set splitright "And to the right. This feels more natural.
"We'll set simpler mappings to switch between splits.
nmap <C-J> <C-W><C-J>
nmap <C-K> <C-W><C-K>
nmap <C-H> <C-W><C-H>
nmap <C-L> <C-W><C-L>
"-------------Mappings--------------"
"Make it easy to edit the Vimrc file.
nmap <Leader>ev :tabedit $MYVIMRC<cr>
"Add simple highlight removal.
nmap <Leader><space> :nohlsearch<cr>
"Make NERDTree easier to toggle.
nmap <D-1> :NERDTreeToggle<cr>
nmap <c-R> :CtrlPBufTag<cr>
nmap <D-e> :CtrlPMRUFiles<cr>
"-------------Plugins--------------"
"/
"/ CtrlP
"/
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git'
let g:ctrlp_match_window = 'top,order:ttb,min:1,max:30,results:30'
"-------------Auto-Commands--------------"
"Automatically source the Vimrc file on save.
augroup autosourcing
autocmd!
autocmd BufWritePost .vimrc source %
augroup END
filetype off " required
"Set the runtime path to include Vundle and initialize.
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-vinegar'
Plugin 'scrooloose/nerdtree'
Plugin 'ctrlpvim/ctrlp.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
@apertureless

This comment has been minimized.

Copy link

@apertureless apertureless commented Feb 7, 2016

Quick fix

let g:ctrlp_custom_ignore = 'node_modules\DS_Store\|git

should be

let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git

@JeffreyWay

This comment has been minimized.

Copy link
Owner Author

@JeffreyWay JeffreyWay commented Feb 12, 2016

Thanks!

@gpspake

This comment has been minimized.

Copy link

@gpspake gpspake commented Feb 18, 2016

set t_CO=256 should be set t_Co=256
(for Ubuntu at least; I'm not sure if the same as true for OS X)

@PresKhaled

This comment has been minimized.

Copy link

@PresKhaled PresKhaled commented Jul 10, 2020

set t_CO=256 should be set t_Co=256
(for Ubuntu at least; I'm not sure if the same as true for OS X)

You right, I'm on windows and this changed the colors well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment