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
" Ignore some folders and files for CtrlP indexing | |
let g:ctrlp_custom_ignore = { | |
\ 'dir': '\.git$\|\.yardoc\|node_modules\|log\|tmp$', | |
\ 'file': '\.so$\|\.dat$|\.DS_Store$' | |
\ } |
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
interface State { | |
propA: number; | |
propB: string; | |
} | |
/** | |
* TypeScript is a structural type system. This means as long as your data | |
* structure satisfies a contract, TypeScript will allow it. Even if you have | |
* too many keys declared. | |
* |
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
function! s:format_qf_line(line) | |
let parts = split(a:line, ':') | |
return { 'filename': parts[0] | |
\,'lnum': parts[1] | |
\,'col': parts[2] | |
\,'text': join(parts[3:], ':') | |
\ } | |
endfunction | |
function! s:qf_to_fzf(key, line) abort |
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
" netrw | |
let g:netrw_banner = 0 " hide banner | |
let g:netrw_altv=1 " open splits to the right | |
let g:netrw_liststyle=3 " tree view | |
let g:netrw_list_hide=netrw_gitignore#Hide() | |
function! s:open_netrw() | |
" Grab the current file name | |
let file_name = expand("%:t") | |
" Open a 20-column left-side netrw explorer in the directory for the current |
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
set fish_git_dirty_color red | |
set fish_git_not_dirty_color green | |
function parse_git_branch | |
set -l branch (git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/\1/') | |
set -l git_status (git status -s) | |
if test -n "$git_status" | |
echo (set_color $fish_git_dirty_color)$branch(set_color normal) | |
else |
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
" reverse-i-search | |
function! s:get_history() | |
redir => history | |
silent! history | |
redir END | |
return map(split(history, '\n'), "strpart(v:val, 9)") | |
endfunction | |
function! s:run_cmd(cmd) | |
execute a:cmd | |
endfunction |
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
" https://asciinema.org/a/kE1398clJWRPPhk3lWbtvbanF | |
" Presentation mode | |
" | |
" use <left> and <right> to navigate the slides | |
" | |
" https://github.com/plasticboy/vim-markdown Makes folds by sections (among many other things) | |
" https://github.com/junegunn/goyo.vim Distraction-free writing (and reading) in Vim | |
function! s:enter_presentation() |
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
let g:mapleader = "\<SPACE>" | |
" Show white spaces at the end of a line | |
" set list listchars=tab:▸\ ,eol:¬,trail:· | |
set list listchars=tab:▸\ ,trail:· | |
set mouse=a | |
" edit this nvim config | |
command! Vimrc tabedit $HOME/.config/nvim/init.vim |
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
diff --git a/src/App.js b/src/App.js | |
index b8ec935..04a4045 100644 | |
--- a/src/App.js | |
+++ b/src/App.js | |
@@ -30,9 +30,10 @@ class App extends Component { | |
} | |
selectTrip = tripId => { | |
- this.setState({ | |
- selectedTrip: tripId |
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
function precmd() { | |
if command git rev-parse --git-dir > /dev/null 2>&1; then | |
window_label=$(git rev-parse --show-toplevel) | |
tab_label=$(echo $window_label | awk -F\/ '{print "[git] " $NF}') | |
else | |
window_label=${PWD/${HOME}/\~} | |
tab_label=$window_label | |
fi | |
echo -ne "\e]2;${window_label}\a" | |
echo -ne "\e]1;${tab_label: -24}\a" |
NewerOlder