Skip to content

Instantly share code, notes, and snippets.

@BrianOn99
Last active November 5, 2017 00:59
Show Gist options
  • Save BrianOn99/6580192ff13262defdfb3265cf202bf2 to your computer and use it in GitHub Desktop.
Save BrianOn99/6580192ff13262defdfb3265cf202bf2 to your computer and use it in GitHub Desktop.
dotfiles
source $HOME/antigen.zsh
# Load the oh-my-zsh's library.
antigen use oh-my-zsh
# Bundles from the default repo (robbyrussell's oh-my-zsh).
antigen bundle git
# Syntax highlighting bundle.
antigen bundle zsh-users/zsh-syntax-highlighting
# Load the theme.
antigen theme candy
# Tell Antigen that you're done.
antigen apply
export VISUAL=nvim
export EDITOR=nvim
export TERM=xterm-256color
export PATH=$PATH:$HOME/.gem/ruby/2.4.0/bin:$HOME/.cargo/bin
export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
For neovim, put it in ~/.config/nvim/init.vim For vim, put it in ~/.vimrc
line 86 to 127 require Neobundle, which is a neovim plugin. Remove them if you use vim.
line 129 use the jeallybean colorscheme which is not installed by default.
scriptencoding utf-8
set nocompatible " Use Vim defaults (much better!)
set history=50 " keep 50 lines of command history
set viminfo='20,\"500 " Keep a .viminfo file.
" ===
" Layout
" ===
colorscheme jellybeans
set ruler " Show the cursor position all the time
set showcmd
set wildmenu
set showmatch
" {{{ Syntax highlighting settings
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
" }}}
set nu
" When displaying line numbers, don't use an annoyingly wide number column. This
" doesn't enable line numbers -- :set number will do that. The value given is a
" minimum width to use for the number column, not a fixed size.
if v:version >= 700
set numberwidth=3
endif
" ===
" space
" ===
set tabstop=8 " How wide is a tab visually
set expandtab
set tw=80
" ===
" search
" ===
set incsearch
set hlsearch
" ===
" folding
" ===
set foldenable
set foldlevelstart=10
set foldmethod=syntax
" When doing tab completion, give the following files lower priority. You may
" wish to set 'wildignore' to completely ignore files, and 'wildmenu' to enable
" enhanced tab completion. These can be done in the user vimrc file.
set suffixes+=.info,.aux,.log,.dvi,.bbl,.out,.o,.lo
" Always check for UTF-8 when trying to determine encodings.
if &fileencodings !~? "utf-8"
" If we have to add this, the default encoding is not Unicode.
" We use this fact later to revert to the default encoding in plaintext/empty
" files.
let g:added_fenc_utf8 = 1
set fileencodings+=utf-8
endif
" Make sure we have a sane fallback for encoding detection
if &fileencodings !~? "default"
set fileencodings+=default
endif
" }}}
" {{{ Filetype plugin settings
" Enable plugin-provided filetype settings, but only if the ftplugin
" directory exists (which it won't on livecds, for example).
if isdirectory(expand("$VIMRUNTIME/ftplugin"))
filetype plugin on
filetype indent on
endif
" }}}
"
call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'neomake/neomake'
Plug 'rust-lang/rust.vim'
Plug 'racer-rust/vim-racer'
call plug#end()
au FileType rust nmap gd <Plug>(rust-def)
au FileType rust nmap gs <Plug>(rust-def-split)
au FileType rust nmap gx <Plug>(rust-def-vertical)
au FileType rust nmap <leader>gd <Plug>(rust-doc)
let g:rubycomplete_buffer_loading = 1
let g:rubycomplete_classes_in_global = 1
autocmd FileType java setlocal omnifunc=javacomplete#Complete
autocmd FileType c set noexpandtab
nmap <F5> <Plug>(JavaComplete-Imports-Add)
imap <F5> <Plug>(JavaComplete-Imports-Add)
au FileType ruby setl sw=2 et
au FileType java setl sw=4 et
au FileType python setl sw=4 et
au FileType xml setl sw=4 et
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment