michaelfox + vim   105

Merge multiple lines in Vim - Stack Overflow
:5,8del | let l=split(@") | 1,4s/$/=remove(l,0)/
vim  clever  daftpunk  split 
5 days ago by michaelfox
tbaggery - Effortless Ctags with Git
git config --global init.templatedir '~/.git_template'
mkdir -p ~/.git_template/hooks



#!/bin/sh
rm -f .git/tags
ctags --tag-relative -Rf.git/tags --exclude=.git --languages=-javascript,sql
ctags  git  githook  vim  fugitive.vim  git-hooks 
january 2012 by michaelfox
Solarized - Ethan Schoonover
Solarized is a sixteen color palette (eight monotones, eight accent colors) designed for use with terminal and gui applications. It has several unique properties. I designed this colorscheme with both precise CIELAB lightness relationships and a refined set of hues based on fixed color wheel relationships. It has been tested extensively in real world use on color calibrated displays (as well as uncalibrated/intentionally miscalibrated displays) and in a variety of lighting conditions
color  terminal  theme  vim 
april 2011 by michaelfox
Vim OS Check — Gist
" -OS-Check---------------------------------------------------------------------
function! MySys()
  if has("win32")
    return "win32"
  elseif has("mac") || has("macunix")
    return "mac"
  elseif has("unix")
    return "unix"
  else
    return "unix"
  endif
endfunction
" ------------------------------------------------------------------------------
vim  osx  os  dotfiles 
march 2011 by michaelfox
Secrets of tabs in vim
I spend much of my day working on other people's code. People who have uncivilized ideas about how to indent their code. (Given some of the code I've seen, I sometimes think I should be simply pleased that they bothered to indent their code at all.) Until civilization aligns and we finally have elastic tabs, I'll have to deal with different tab styles. The popular ones tend to be:

Tabs are eight columns wide. Each indentation level is one tab. (Popular with the Linux kernel.)
Tabs are four columns wide. Each indentation level is one tab. (Popular with Windows developers using Visual Studio.)
Each indentation level is four spaces. Tabs are not used. (Popular with Java programmers.)
I've seen some especially ... creative tab styles not listed above, including code indented with various innovative mixture of tabs and spaces. Out of the box, my favorite text editor (vim and its gui cousin, gvim) will default to indent using eight-column tabs, but vim can handle any (consistent) indentation style I've seen using four easy commands: tabstop, shiftwidth, expandtab, and softtabstop. (Each command listed below has links to the vim documentation for more details.)
vim  editor  tabs 
february 2011 by michaelfox
Some Vim-related notes | Ithaca
" status line hijinks set statusline=%<%f\ %h%m%r%y \%{exists('g:loaded_fugitive')?fugitive#statusline():''} \%{exists('g:loaded_rvm')?rvm#statusline_ft_ruby():''} \%{&filetype=='perl'?'['.system($perlv).']':''} \%=%-14.(%l,%c%V%)\ %P
vim  statusline 
january 2011 by michaelfox
pentadactylrc at master from mattsacks's dotfiles - GitHub
" .pentadactylrc - Matt Sacks

set mapleader=","

"{{{ Options
set novb
set complete=l
set defsearch=gg
set newtab=all
set urlseparator=",,"
set hintkeys='01234789'
set nostrictfocus
"}}}

"{{{ PassKeys
set passkeys+='mail\.google\.com':c/jkhnpouelxsfra#`[]z?*nrtgidIU+-=<Tab><Return>
set passkeys+='mail\.google\.com/tasks/canvas':<Tab><S-Tab><Return>
set passkeys+='google\.com/reader':jkvnpbumoaAXNOVPJK?gehtl<Return>
set passkeys+='twitter\.com':jk<Space>/.frtmn?ghrpu<Return>
set passkeys+='rememberthemilk\.com/home/p':trsjkdhyucpgfinalez1234<Return>
set passkeys+='www\.google\.com/calendar':dwmxajkcnqetp?<Del>s12345<Return>
set passkeys+='springpadit\.com/springpad':?hgmfntljk/c<Return>
set passkeys+='toodledo\.com/':?fn*aitzwjklmocdgxpsheybr123456789<Esc><Return>
set passkeys+='duckduckgo\.com/':\!lo<C-Return>jkh<Esc>\'v/rs1<Return>
"}}}

"{{{ Shortcuts
map <Leader>r :o read<CR>
map <Leader>n :o notforest<CR>
map <Leader>in :o insta<CR>
map <Leader>ib :o instab<CR>
map <Leader>il :o instalong<CR>
map <Leader>e :tabopen!
map K :o g
map <Leader>s :tabopen g
map <Leader>S :tabopen! g
map <Leader>fr :open firebug<CR>
ab leeblo extoptions LeechBlock
map <C-l> :noh<CR>
"}}}

"{{{ Navigation
nno j 5j
nno k 5k
nno <C-e> 10<C-e>
nno <C-y> 10<C-y>
cno <C-P> <Up>
cno <C-N> <Down>
cno <C-b> <Left>
cno <C-f> <Right>
ino <C-b> <Left>
ino <C-f> <Right>
ino <C-p> <Up>
ino <C-n> <Down>
map ,, <C-^>
"}}}

"{{{ Site Specific
" Don't focus on Reddit frame
autocmd LocationChange 'reddit\.com/tb/' -js buffer.focusElement(buffer.allFrames()[2]);
" Focus on the Android docs
autocmd PageLoad 'developer\.android\.com/' -js buffer.followLink(document.getElementById("doc-content"));
"}}}

" vi:filetype=vim foldmethod=marker
pentadactyl  vim  vimperator  dotfiles  firefox  plugins  config  examples 
january 2011 by michaelfox
« earlier      

related tags

ack  addons  align  apps  audio  bash  beginner  bin  brew  browser  browsing  cheatsheet  chiptunes  chrome  clever  cli  cocoa  code  collection  color  colorscheme  command  commandline  commands  config  ctags  daftpunk  debugging  development  documentation  dotfiles  editor  efficiency  environment  examples  extension  extensions  find  firefox  fugitive.vim  fuzzyfinder  game  gamedev  git  git-hooks  githook  github  github-repo  github-user  github-user-carlierche  github-user:spf13  google  gui  guide  hack  hackernews  homebrew  howto  html5  ide  inspiration  interactive  interface  irc  javascript  keybindings  keyboard  launchbar  lifehacks  linux  list  mac  macvim  man  markdown  midi  mml  mouse  mozilla  music  nes  opensource  os  osx  pentadactyl  php  phpdocumentor  plugin  plugins  podcasts  preview  productivity  profile  python  rails  reddit  reference  repository  resources  ruby  screencast  screencasts  sessions  settings  setup  shell  shortcut  shortcuts  snippets  split  ssh  stackoverflow  statusline  tabs  tabular  terminal  textmate  theme  tips  tmux  tools  transmit  tricks  tutorial  tutorials  usability  utilities  utility  versioncontrol  vi  video  vim  vimperator  vimrc  web  wiki  zsh   

Copy this bookmark:



description:


tags: