Skip to content

Instantly share code, notes, and snippets.

@pkinsky pkinsky/vimrc
Created Jan 23, 2017

What would you like to do?
" install plugins. (requires running :PlugInstall)
" Specify a directory for plugins (for Neovim: ~/.local/share/nvim/plugged)
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
Plug 'altercation/vim-colors-solarized'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/syntastic'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'ervandew/supertab'
Plug 'neomake/neomake'
Plug 'vim-airline/vim-airline'
Plug 'bitc/vim-hdevtools'
" Plug 'eagletmt/neco-ghc'
Plug 'eagletmt/ghcmod-vim'
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
" might be cool, needs custom font. wait for osx, update: working now, ish, in vim gui on chromeos
Plug 'ryanoasis/vim-devicons'
" useful plugin, commented out b/c it breaks nerdtree
"Plug 'kshenoy/vim-signature' " seems useful, still exploring shortcuts. uses 'm' prefix, may break nerd tree
" Initialize plugin system
call plug#end()
" with neo solarized
colorscheme solarized
" solarized config
syntax enable
set background=dark
set encoding=utf8
" fancy devicons fonts, may not be needed (file type icons work in vim without
" it, for example)
"works, 56 lines. v. pretty, cannot use b/c it does wierd things to <CR> <C-n>
"set guifont=Monoid\ Nerd\ Font\ 17
" a good font (requires nerd font install via script)
set guifont=RobotoMono\ Nerd\ Font\ 17
"customizing nerdtree
" ctrl-n (doesn't work on chromeos terminal, only gvim)
map <C-n> :NERDTreeToggle<CR>
" may not do anything
let g:airline_powerline_fonts = 1
" adding to vim-airline's tabline
let g:webdevicons_enable_airline_tabline = 1
" adding to vim-airline's statusline
let g:webdevicons_enable_airline_statusline = 1
" whether or not to show the nerdtree brackets around flags. doesn't seem to
" work?
let g:webdevicons_conceal_nerdtree_brackets = 0
"syntastic stuff
map <Leader>s :SyntasticToggleMode<CR>
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 0
let g:syntastic_check_on_wq = 0
" supertab stuff, this is not a shortcut I use but mb it's used by supertab
" internals? like it maps tab to the ctrl-x/ctrl-o omnicomp shortcut
let g:SuperTabDefaultCompletionType = '<c-x><c-o>'
if has("gui_running")
imap <c-space> <c-r>=SuperTabAlternateCompletion("\<lt>c-x>\<lt>c-o>")<cr>
else " no gui
if has("unix")
inoremap <Nul> <c-r>=SuperTabAlternateCompletion("\<lt>c-x>\<lt>c-o>")<cr>
let g:haskellmode_completion_ghc = 1
autocmd FileType haskell setlocal omnifunc=necoghc#omnifunc
" enable detailed type info in omnicomplete
let g:necoghc_enable_detailed_browse = 1
" for autocomplete via omnifunc
filetype plugin on
set omnifunc=syntaxcomplete#Complete`
" experimental haskell stuff
augroup ft_haskell
au FileType haskell setlocal omnifunc=necoghc#omnifunc
"so ghc-mod from stack is in vim's path
let $PATH = $PATH . ':' . expand('~/.local/bin')
augroup END
" 'sensible defaults', taken from some blog post. I don't know what most of
" these do. todo: find out
syntax on
filetype plugin indent on
set nocompatible
set number
set nowrap
set showmode
set tw=80
set smartcase
set smarttab
set smartindent
set autoindent
set softtabstop=2
set shiftwidth=2
set expandtab
set incsearch
set mouse=a
set history=1000
set clipboard=unnamedplus,autoselect
set completeopt=menuone,menu,longest
set wildignore+=*\\tmp\\*,*.swp,*.swo,*.zip,.git,.cabal-sandbox
set wildmode=longest,list,full
set wildmenu
set completeopt+=longest
set t_Co=256
set cmdheight=1
set clipboard=unnamed
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/pkinsky/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See
# cleans up agnoster status line when user = default user
# Uncomment the following line to use case-sensitive completion.
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# Uncomment the following line to disable bi-weekly auto-update checks.
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# Uncomment the following line to disable auto-setting terminal title.
# Uncomment the following line to enable command auto-correction.
# Uncomment the following line to display red dots whilst waiting for completion.
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|""|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git, docker)
source $ZSH/
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
export PATH="/Users/pkinsky/.local/bin:/Users/pkinsky/.cabal/bin:$PATH"
export EDITOR="vim"
. /Users/pkinsky/.nix-profile/etc/profile.d/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.