Skip to content

Instantly share code, notes, and snippets.

View blueyed's full-sized avatar
💭
❤️ not eating nor abusing animals 🍀

Daniel Hahler blueyed

💭
❤️ not eating nor abusing animals 🍀
View GitHub Profile
@christoomey
christoomey / gist:759231
Created December 29, 2010 23:44
Git aware command T functions. Use git repo top level as Command T context, else top level
function! Command_T_Local() "Go to the root of the git repo, then CommandT
"Ask git for the root of the git repo (as a relative '../../' path)
let git_top = system('git rev-parse --show-cdup')
let git_fail = 'fatal: Not a git repository'
if strpart(git_top, 0, strlen(git_fail)) == git_fail
" Above line says we are not in git repo. Ugly. Better version?
call Command_T_Work()
else
" Move working dir to root of repo, then CommandT
execute ":cd ./" . git_top
@juanpabloaj
juanpabloaj / nextBufOrTab.vim
Created October 14, 2011 17:43
gt next buffer or tab
" http://j.mp/dotvimrc
nn gt : exec tabpagenr('$') == 1 ? 'bn' : 'tabnext'<CR>
nn gT : exec tabpagenr('$') == 1 ? 'bp' : 'tabprevious'<CR>
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@Thermionix
Thermionix / grub.cfg
Last active June 7, 2021 17:47
grub2 loopback multiboot flash drive
moved to https://github.com/Thermionix/multipass-usb
@dupuy
dupuy / README.rst
Last active April 23, 2024 23:38
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@studgeek
studgeek / Heroku tracking branch.txt
Created March 8, 2012 16:55 — forked from seangeo/Heroku tracking branch.txt
Create a local tracking branch of your heroku/phpfog deployment
Create remote called heroku
> git remote add heroku git@heroku.com:YOURAPPNAME.git
create a local tracking branch called heroku
> git checkout -b heroku -t heroku/master
This will checkout the last revision you deployed to Heroku.
Now tell git to push the heroku branch to heroku/master
@tuzz
tuzz / github.css
Last active April 23, 2024 15:47
Github Markdown Stylesheet
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@AndrewRadev
AndrewRadev / mappings.vim
Created December 8, 2012 10:35
Star ("*") mapping that tries to be a bit smarter
" Using "g*" does two things differently from the normal "*":
"
" - Doesn't move the cursor, simply sets the match
" - When moving the cursor with "n" and "N", positions it where it was on the original word.
"
" Note: g* is ordinarily taken, see :help g*
"
nnoremap g* :call <SID>SmartStar()<cr>
function! s:SmartStar()
@tarruda
tarruda / .README.md
Last active September 27, 2021 13:21
Tmux/Vim integration

Some scripts/configurations that greatly improve tmux/vim workflows. The shell scripts target zsh but should be adaptable without much effort for other unix shells.

Features:

  • Transparently move between tmux panes and vim windows
  • Using the shell, open files in one vim instance per project or directory
  • Fully integrated copy/paste between tmux, vim and x11 using simple keybinds(need to install the xclip program)
  • Easily send text to any tmux pane without breaking your edit workflow(needs slimux

'vim-tmux-move.zsh', '.vimrc' and '.tmux.conf' cooperate so you can move transparently between tmux panes and vim windows using ALT + (arrow keys or jkhl). It was based on this gist

@mislav
mislav / _readme.md
Last active March 28, 2024 00:47
tmux-vim integration to transparently switch between tmux panes and vim split windows

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work: