Last active
January 29, 2019 03:33
-
-
Save jawardell/160d104369e2e2332c26fb417f25b3a8 to your computer and use it in GitHub Desktop.
rc files
This file contains hidden or 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
source ~/.rvm/scripts/rvm | |
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
alias ls="ls -Flarp | more" | |
fortune |
This file contains hidden or 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
" old vim rc | |
" | |
" | |
" colorscheme desert | |
" set number | |
" syntax on | |
" set smartindent | |
" filetype indent on | |
" filetype plugin indent on | |
" | |
" end old commands | |
call plug#begin('~/usr/share/vim/vim80/plugin') | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
call plug#end() | |
" Use Vim settings, rather then Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" source ~/.vimrc.before if it exists. | |
if filereadable(expand("~/.vimrc.before")) | |
source ~/.vimrc.before | |
endif | |
" ================ General Config ==================== | |
set number relativenumber "Line numbers are good | |
set backspace=indent,eol,start "Allow backspace in insert mode | |
set history=1000 "Store lots of :cmdline history | |
set showcmd "Show incomplete cmds down the bottom | |
set showmode "Show current mode down the bottom | |
set gcr=a:blinkon0 "Disable cursor blink | |
set visualbell "No sounds | |
set autoread "Reload files changed outside vim | |
" This makes vim act like all other editors, buffers can | |
" exist in the background without being in a window. | |
" http://items.sjbach.com/319/configuring-vim-right | |
set hidden | |
"turn on syntax highlighting | |
syntax on | |
" Change leader to a comma because the backslash is too far away | |
" That means all \x commands turn into ,x | |
" The mapleader has to be set before vundle starts loading all | |
" the plugins. | |
let mapleader="," | |
set timeout timeoutlen=1500 | |
" ================ Turn Off Swap Files ============== | |
set noswapfile | |
set nobackup | |
set nowb | |
" ================ Persistent Undo ================== | |
" Keep undo history across sessions, by storing in file. | |
" Only works all the time. | |
if has('persistent_undo') && !isdirectory(expand('~').'/.vim/backups') | |
silent !mkdir ~/.vim/backups > /dev/null 2>&1 | |
set undodir=~/.vim/backups | |
set undofile | |
endif | |
" ================ Folds ============================ | |
set foldmethod=indent "fold based on indent | |
set foldnestmax=3 "deepest fold is 3 levels | |
set nofoldenable "dont fold by default | |
" | |
" ================ Scrolling ======================== | |
set scrolloff=8 "Start scrolling when we're 8 lines away from margins | |
set sidescrolloff=15 | |
set sidescroll=1 | |
" ================ Search =========================== | |
set incsearch " Find the next match as we type the search | |
set hlsearch " Highlight searches by default | |
set ignorecase " Ignore case when searching... | |
set smartcase " ...unless we type a capital | |
" ================ Indentation ====================== | |
set autoindent | |
set smartindent | |
set smarttab | |
set shiftwidth=2 | |
set softtabstop=2 | |
set tabstop=2 | |
set expandtab | |
filetype plugin on | |
filetype indent on | |
" Display tabs and trailing spaces visually | |
set list listchars=tab:\ \ ,trail:· | |
set linebreak "Wrap lines at convenient points | |
" ================ Custom Settings ======================== | |
" Window pane resizing | |
nnoremap <silent> <Leader>[ :exe "resize " . (winheight(0) * 3/2)<CR> | |
nnoremap <silent> <Leader>] :exe "resize " . (winheight(0) * 2/3)<CR> | |
" ===== Seeing Is Believing ===== | |
" " Assumes you have a Ruby with SiB available in the PATH | |
" " If it doesn't work, you may need to `gem install seeing_is_believing -v | |
" 3.0.0.beta.6` | |
" " ...yeah, current release is a beta, which won't auto-install | |
" | |
" " Annotate every line | |
" | |
nmap <leader>b :%!seeing_is_believing --timeout 12 --line-length 500 --number-of-captures 300 --alignment-strategy chunk<CR>; | |
" | |
" " Annotate marked lines | |
" | |
nmap <leader>n :%.!seeing_is_believing --timeout 12 --line-length 500 --number-of-captures 300 --alignment-strategy chunk --xmpfilter-style<CR>; | |
" | |
" " Remove annotations | |
" | |
nmap <leader>c :%.!seeing_is_believing --clean<CR>; | |
" | |
" " Mark the current line for annotation | |
" | |
nmap <leader>m A # => <Esc> | |
" | |
" " Mark the highlighted lines for annotation | |
" | |
vmap <leader>m :norm A # => <Esc> | |
" autocmd StdinReadPre * let s:std_in=1 | |
" autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif | |
map <Leader>y "+y | |
map <Leader>d "+d | |
let g:tmux_navigator_no_mappings = 1 | |
nnoremap <silent> {Left-mapping} :TmuxNavigateLeft<cr> | |
nnoremap <silent> {Down-Mapping} :TmuxNavigateDown<cr> | |
nnoremap <silent> {Up-Mapping} :TmuxNavigateUp<cr> | |
nnoremap <silent> {Right-Mapping} :TmuxNavigateRight<cr> | |
nnoremap <silent> {Previous-Mapping} :TmuxNavigatePrevious<cr> | |
let g:spec_runner_dispatcher = "VtrSendCommand! {command}" | |
" RSpec.vim mappings | |
map <Leader>t :call RunCurrentSpecFile()<CR> | |
map <Leader>s :call RunNearestSpec()<CR> | |
map <Leader>l :call RunLastSpec()<CR> | |
map <Leader>a :call RunAllSpecs()<CR> | |
nnoremap <leader>irb :VtrOpenRunner {'orientation': 'h', 'percentage': 50, 'cmd': 'irb'}<cr> | |
" For ruby block selections | |
runtime macros/matchit.vim | |
" For Running plain Ruby test scripts | |
nnoremap <leader>r :RunSpec<CR> | |
nnoremap <leader>l :RunSpecLine<CR> | |
nnoremap <leader>e :RunSpecLastRun<CR> | |
nnoremap <leader>cr :RunSpecCloseResult<CR> | |
NERDTree |
This file contains hidden or 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
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- imports for bootstrap!! :) <3 --> | |
<!-- Latest compiled and minified CSS --> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"> | |
<!-- jQuery library --> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<!-- Latest compiled JavaScript --> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script> | |
<style> | |
</style> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains hidden or 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
"~/.vim/after/ftplugin/html.vim | |
setlocal shiftwidth=2 | |
setlocal tabstop=2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment