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
colo solarized | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.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
" First, clear all autocommands, in case this file is sourced twice | |
autocmd! | |
" Pathogen, front and center | |
call pathogen#infect() | |
" Check for mac, which is unix + uname returns "Darwin" | |
let s:system = "unknown" | |
if has("unix") | |
let s:uname = system("uname") |
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
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# Git completion, from git/contrib/completion | |
source ~/.git-completion.bash | |
EDITOR="vim" | |
VISUAL="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
# vim for everything! | |
EDITOR="vim" | |
VISUAL="vim" | |
# Make vim use tabs, please. | |
alias vim="vim -p" | |
# Yup, definitely worked at Google. | |
alias blaze='bazel' |
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
[Export(typeof(ITaggerProvider))] | |
[TagType(typeof(SquiggleTag))] // this will probably be "IErrorTag" in the next release | |
[ContentType("text")] // "text" is the base of basically all content types | |
internal sealed class ToDoTaggerProvider : ITaggerProvider | |
{ | |
// Note: the "context" arg has been removed, but is still there in Beta 1 | |
public ITagger<T> GetTagger<T>(ITextBuffer buffer, IEnvironment context) where T : ITag | |
{ | |
return new ToDoTagger() as ITagger<T>; | |
} |
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
[Export(typeof(ITaggerProvider))] | |
[TagType(typeof(SquiggleTag))] // this will probably be "IErrorTag" in the next release | |
[ContentType("text")] // "text" is the base of basically all content types | |
internal sealed class ToDoTaggerProvider : ITaggerProvider | |
{ | |
// Note: the "context" arg has been removed, but is still there in Beta 1 | |
public ITagger<T> GetTagger<T>(ITextBuffer buffer, IEnvironment context) where T : ITag | |
{ | |
return new ToDoTagger() as ITagger<T>; | |
} |
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
internal sealed class ToDoTagger : ITagger<SquiggleTag> | |
{ | |
// Our simple tagger can ignore this for now | |
public Event<SnapshotSpanChangedArgs> TagsChanged; | |
public IEnumerable<ITagSpan<SquiggleTag>> GetTags(NormalizedSnapshotSpanCollection spans) | |
{ | |
foreach(SnapshotSpan span in spans) | |
{ | |
string spanText = span.GetText(); |
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
// starting with a SnapshotPoint, text line, or SnapshotSpan | |
SnapshotPoint point; | |
ITextSnapshotLine line = point.GetContainingLine(); | |
SnapshotSpan extent = line.Extent; | |
SnapshotPoint start; | |
for (start = extent.Start; start < line.End && char.IsWhitespace(start.GetChar()); start++); | |
SnapshotSpan extentExcludingLeadingWhitespace = new SnapshotPoint(start, extent.End); |
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
// Make the background goldenrod yellow :) | |
[Export(typeof(IWpfTextViewCreationListener))] | |
[ContentType("text")] | |
[TextViewRole(PredefinedTextViewRoles.Document)] | |
internal sealed class CreationListener : IWpfTextViewCreationListener | |
{ | |
public void TextViewCreated(IWpfTextView textView, IEnvironment context) | |
{ | |
textView.Background = Brushes.PaleGoldenrod; |
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
using System.ComponentModel.Composition; | |
using Microsoft.VisualStudio.Utilities; | |
using Microsoft.VisualStudio.Text.Editor; | |
using Microsoft.VisualStudio.Text.Outlining; | |
using System.Windows.Input; | |
using Microsoft.VisualStudio.Text; | |
namespace CollapseAllButThis | |
{ | |
[Export(typeof(IKeyProcessorProvider))] |
NewerOlder