Created
December 5, 2018 16:15
-
-
Save syntacticsugar/4b3a6830ad536ac3b80001831d490bab to your computer and use it in GitHub Desktop.
.vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"this is the .vimrc for the mac terminal... | |
" important, let mapleader has to go first here.. | |
"Sun Mar 3 19:30:06 2013 | |
" execute pathogen#infect() | |
"set nowrap | |
let mapleader="," | |
"Thu Feb 18 16:31:32 EST 2016 | |
"let g:user_emmet_expandabbr_key = '<Tab>' | |
nmap <F3> i<C-R>=strftime("%Y-%m-%d %a %I:%M %p")<CR><Esc> | |
imap <F3> <C-R>=strftime("%Y-%m-%d %a %I:%M %p")<CR> | |
set showcmd | |
map <leader>e :e ~/.vimrc<CR> | |
autocmd! bufwritepost ~/.vimrc source ~/.vimrc | |
" autocmd! bufwritepost ~/.bash_profile source ~/.bash_profile | |
filetype plugin indent on | |
autocmd FileType sass setlocal sw=2 ts=2 et | |
autocmd FileType ruby setlocal sw=2 ts=2 et | |
autocmd FileType slim setlocal sw=2 ts=2 et | |
autocmd BufNewFile,BufRead Gemfile set filetype=ruby | |
autocmd FileType haskell setlocal sw=4 ts=4 et | |
autocmd FileType txt setlocal sw=4 ts=4 et | |
autocmd FileType html setlocal sw=2 ts=2 et | |
autocmd FileType erb setlocal sw=4 ts=4 et | |
autocmd FileType haml setlocal sw=2 ts=2 | |
autocmd FileType python setlocal sw=2 ts=2 et | |
autocmd FileType javascript setlocal sw=2 ts=2 et | |
autocmd FileType json setlocal sw=2 ts=2 et | |
autocmd FileType jade setlocal sw=2 ts=2 et | |
autocmd FileType scheme setlocal sw=2 ts=2 et | |
autocmd FileType scm setlocal sw=2 ts=2 et | |
autocmd FileType css setlocal sw=2 ts=2 et | |
autocmd FileType less setlocal sw=2 ts=2 et | |
autocmd FileType styl setlocal sw=2 ts=2 et | |
autocmd FileType scss setlocal sw=2 ts=2 et | |
autocmd FileType vimrc setlocal sw=2 ts=2 et | |
autocmd BufNewFile,BufRead *.json set ft=javascript | |
set ls=2 | |
"set cul | |
set ruler | |
set visualbell | |
set number | |
nore ; : | |
nore , ; | |
inoremap <Down> <C-o>gj | |
inoremap <Up> <C-o>gk | |
" Syntax highlighting. | |
syntax on | |
"Insert date (F2 key) | |
:map <F2> a<C-R>=strftime("%c")<CR><Esc> | |
" highlight tabs and trailing spaces | |
set listchars=tab:>-,trail:- | |
set list | |
set incsearch | |
set hlsearch | |
"Wheeee!!! saves me from having to hit 'esc' to leave insert mode! | |
map! ii <Esc> | |
map! jk <Esc> | |
"lazy hacks that are obvious, although because i remapped ; i'm not sure if it | |
"helps much | |
":command WQ wq | |
":command Wq wq | |
":command W w | |
":command Q q | |
iab anf and | |
iab adn and | |
iab ans and | |
iab teh the | |
iab thre there | |
set clipboard+=unnamed " Yanks go on clipboard instead. | |
set history=256 " Number of things to remember in history | |
"set cursorline | |
" Window navigation shortcuts | |
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> | |
" Ctrl-j/k deletes blank line below/above, and Alt-j/k inserts. | |
"nnoremap <silent><C-j> m`:silent +g/\m^\s*$/d<CR>``:noh<CR> | |
"nnoremap <silent><C-k> m`:silent -g/\m^\s*$/d<CR>``:noh<CR> | |
nnoremap <silent><A-j> :set paste<CR>m`o<Esc>``:set nopaste<CR> | |
nnoremap <silent><A-k> :set paste<CR>m`O<Esc>``:set nopaste<CR> | |
"Tue Mar 4 18:31:15 2014 | |
"execute pathogen#infect() | |
"Tue Mar 25 11:59:02 2014 | |
"Menu items for Commenting and Un-Commenting code | |
amenu 20.435 &Edit.-SEP4- : | |
amenu Edit.Comment <Esc>`<:let fl=line(".")<CR>`>:let ll=line(".")<CR>:call Comment(fl, ll)<CR> | |
amenu Edit.UnComment <Esc>`<:let fl=line(".")<CR>`>:let ll=line(".")<CR>:call UnComment(fl, ll)<CR> | |
" if has ('gui_running') | |
" colorscheme gummybears | |
" set background=light | |
" colorscheme solarized | |
if has ('gui_running') | |
syntax on | |
set guifont=Monaco:h18 | |
set hlsearch | |
colorscheme proton | |
set bs=2 | |
set ai | |
set ruler | |
endif | |
"Vundle Config | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'VundleVim/Vundle.vim' | |
"elixir | |
Plugin 'elixir-editors/vim-elixir' | |
Plugin 'slashmili/alchemist.vim' | |
call vundle#end() " required | |
filetype plugin indent on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment