Skip to content

Instantly share code, notes, and snippets.

@inanna-malick
Created January 23, 2017 20:29
Show Gist options
  • Save inanna-malick/67a36aae02025c3f0c6f037600e4fd71 to your computer and use it in GitHub Desktop.
Save inanna-malick/67a36aae02025c3f0c6f037600e4fd71 to your computer and use it in GitHub Desktop.
dotfiles
" 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>
"symbols
"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>
endif
endif
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!
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 https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
# cleans up agnoster status line when user = default user
DEFAULT_USER="pkinsky"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# 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.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# 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.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# 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"|"dd.mm.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/oh-my-zsh.sh
# 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/nix.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment