Created
December 27, 2017 22:05
-
-
Save ctranstrum/826c13927a5642e1d98946ab0145b62d to your computer and use it in GitHub Desktop.
config
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
[[ -s ~/.bashrc ]] && source ~/.bashrc | |
[[ -d ~/.bashd ]] && for f in ~/.bashd/*; do source $f; done |
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
env: | |
es6: true | |
node: true | |
extends: 'eslint:recommended' | |
parserOptions: | |
sourceType: module | |
rules: | |
indent: | |
- error | |
- 2 | |
linebreak-style: | |
- error | |
- unix | |
quotes: | |
- warn | |
- single | |
semi: | |
- error | |
- always | |
no-console: | |
- off |
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
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
"\e[1;5C": forward-word | |
"\e[1;5D": backward-word |
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
call pathogen#infect() " autoload more awesome | |
set nocompatible " Disable vi overcompatibility | |
syntax enable " Syntax highlighting on | |
" search | |
set ignorecase | |
set incsearch | |
set hlsearch | |
"" Line numbering in the left column | |
set number | |
"" indenting and tabstop stuff. 2 spaces all over. | |
"" most of this is serious cargo-cultism, and could probably be cleaned up. | |
set smartindent | |
set tabstop=8 | |
set softtabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set smarttab | |
set autoindent | |
filetype indent plugin on | |
" Puppet arrows should be aligned | |
"" Auto-indent puppet arrows with ,a= | |
let mapleader=',' | |
nmap <Leader>a= :Tabularize /=><CR> | |
vmap <Leader>a= :Tabularize /=><CR> | |
" Vim indentation | |
let g:terraform_align=1 | |
"" Syntastic auto-check, this can be a bit slow. | |
let g:syntastic_check_on_open=1 | |
let g:syntastic_javascript_checkers = ['eslint'] | |
"" Syntastic puppet-lint check disabling. | |
"" The trailing space is REQUIRED, which is dumb/a bug/both. | |
"let g:syntastic_puppet_lint_arguments=' --no-80chars-check ' | |
" toggle paste outside INSERT mode " | |
map <Leader>p :set invpaste<CR>:set paste?<CR> | |
nmap <Leader>p :set invpaste<CR>:set paste?<CR> | |
vmap <Leader>p :set invpaste<CR>:set paste?<CR> | |
" toggle paste in INSERT mode " | |
"#set pastetoggle=<Leader>p | |
set laststatus=2 | |
set t_Co=256 | |
set encoding=utf-8 | |
set fillchars+=stl:\ ,stlnc:\ | |
let g:Powerline_symbols = 'unicode' | |
set statusline=%<%f\ %h%w%m%r%y%=L:%l/%L\ (%p%%)\ C:%c%V\ B:%o\ F:%{foldlevel('.')} | |
" An example for a vimrc file. | |
" | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last change: 2008 Dec 17 | |
" | |
" To use it, copy it to | |
" for Unix and OS/2: ~/.vimrc | |
" for Amiga: s:.vimrc | |
" for MS-DOS and Win32: $VIM\_vimrc | |
" for OpenVMS: sys$login:.vimrc | |
" allow backspacing over everything in insert mode | |
set backspace=indent,eol,start | |
" Don't use Ex mode, use Q for formatting | |
map Q gq | |
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, | |
" so that you can undo CTRL-U after inserting a line break. | |
inoremap <C-U> <C-G>u<C-U> | |
" In many terminal emulators the mouse works just fine, thus enable it. | |
if has('mouse') | |
set mouse=a | |
endif | |
" Only do this part when compiled with support for autocommands. | |
if has("autocmd") | |
" Put these in an autocmd group, so that we can delete them easily. | |
augroup vimrcEx | |
au! | |
" For all text files set 'textwidth' to 78 characters. | |
autocmd FileType text setlocal textwidth=78 | |
" Let's see if we can change go's tabs to 4 space | |
autocmd FileType go setlocal tabstop=4 | |
" Help vim understand non-standard file extensions | |
autocmd BufNewFile,BufRead *.tjs set filetype=javascript | |
" When editing a file, always jump to the last known cursor position. | |
" Don't do it when the position is invalid or when inside an event handler | |
" (happens when dropping a file on gvim). | |
" Also don't do it when the mark is in the first line, that is the default | |
" position when opening a file. | |
autocmd BufReadPost * | |
\ if line("'\"") > 1 && line("'\"") <= line("$") | | |
\ exe "normal! g`\"" | | |
\ endif | |
augroup END | |
endif " has("autocmd") | |
" Convenient command to see the difference between the current buffer and the | |
" file it was loaded from, thus the changes you made. | |
" Only define it when not defined already. | |
if !exists(":DiffOrig") | |
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis | |
\ | wincmd p | diffthis | |
endif | |
" Syntax highlighting colors | |
highlight Comment ctermfg=DarkRed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment