Skip to content

Commit

Permalink
Merge branch 'master' of gitorious.atomicobject.com:vim-settings/colt…
Browse files Browse the repository at this point in the history
…horp
  • Loading branch information
JSchaenzle committed Mar 18, 2014
2 parents 24a173d + c4f8983 commit d46ad88
Show file tree
Hide file tree
Showing 271 changed files with 20,898 additions and 1,619 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
[submodule "bundle/vim-puppet"]
path = bundle/vim-puppet
url = https://github.com/rodjek/vim-puppet.git
[submodule "bundle/optional/YouCompleteMe"]
path = bundle/optional/YouCompleteMe
url = https://github.com/Valloric/YouCompleteMe.git
[submodule "bundle/vim-gnupg"]
path = bundle/vim-gnupg
url = https://github.com/jamessan/vim-gnupg
2 changes: 1 addition & 1 deletion README.textile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Atomic Vim has a few ideas that (not entirely consistently) direct it's approach

h2. To use:

Clone into @~/.vim@, and addadd @source ~/.vim/common-vimrc.vim@ to your @.vimrc@. @brew install ctags@ to get exuberant ctags. I've mainly used the config under cygwin on windows, but gvim works pretty well (I've never tried setting up ctags and ruby on windows without cygwin).
Clone into @~/.vim@, and add @source ~/.vim/common-vimrc.vim@ to your @.vimrc@. @brew install ctags@ to get exuberant ctags. I've mainly used the config under cygwin on windows, but gvim works pretty well (I've never tried setting up ctags and ruby on windows without cygwin).

h2. Project settings

Expand Down
12 changes: 9 additions & 3 deletions alles-vimrc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set nofoldenable

"set nonu
"colorscheme koehler
colorscheme default

" Tidy (cheap shot; would like a better plugin)
cabbr tidy %!tidy -q -i -ashtml<CR>
Expand Down Expand Up @@ -56,14 +57,19 @@ map <F4> :A
map <F3> :A
map <F2> :A
let optional = []
let optional += ["nerdtree"]
map <F7> :call VimWriteRoom()<CR>
" let optional = []
" let optional += ["nerdtree"]
" let optional += ["autoclose"]
call OptionalBundles#Include(optional)
" call OptionalBundles#Include(optional)

nnoremap <leader>n :NERDTreeToggle<cr>
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
set gfn=Menlo:h14

6 changes: 5 additions & 1 deletion anderson-vimrc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ let optional += ["nerdtree"]
let optional += ["tabular"]
let optional += ["webapi-vim"]
let optional += ["gist-vim"]
call OptionalBundles#Include(optional)
call optional#include(optional)

set nu
" set list
Expand Down Expand Up @@ -60,3 +60,7 @@ endfunction
:command! PromoteToLet :call PromoteToLet()
:map <leader>p :PromoteToLet<CR>

map K <Nop>
autocmd Filetype gitcommit setlocal spell textwidth=72
45 changes: 45 additions & 0 deletions bacon-vimrc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ let optional += ["scratch"]
let optional += ["conque"]
let optional += ["gundo"]
let optional += ["cucumber"]
let optional += ["vim-elixir"]
let optional += ["ag.vim"]
let optional += ["indentLine"]
call optional#include(optional)

if v:version >= 703
Expand All @@ -20,6 +23,9 @@ set directory=~/tmp

:set guifont=Menlo:h14

" Don't let NERDTree hijack the normal Netrw directory browser
let g:NERDTreeHijackNetrw=0

" Status line. mostly stolen from A Byte of Vim
set laststatus=2
set statusline=
Expand All @@ -41,6 +47,11 @@ set scrolloff=3
" let g:solarized_termcolors=16
" colorscheme solarized

let g:paredit_leader='\'
" clojure configuration
let vimclojure#ParenRainbow = 1
let vimclojure#HighlightBuiltins = 1

" Run the current file. Uses .vim/ruby/run_file_in_terminal.rb
noremap <leader>r :RunFileInTerminal<cr>
noremap <leader>R :RunFileAtLineInTerminal<cr>
Expand Down Expand Up @@ -102,6 +113,7 @@ nnoremap <leader>n :NERDTreeToggle<cr>
autocmd User Rails Rnavcommand fabricator spec/fabricators -suffix=_fabricator.rb -default=model()

let g:AutoClosePairs = {'(': ')', '{': '}', '[': ']', '"': '"', "'": "'", '#{': '}' }
" let g:AutoClosePairs = {'(': ')', '{': '}', '[': ']', '"': '"', '#{': '}' }
let g:AutoCloseProtectedRegions = ["Character", "Comment"]

" F12 removes trailing whitespace
Expand Down Expand Up @@ -157,3 +169,36 @@ map <F2> :A<CR>
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
" CtrlP Config
let g:ctrlp_map = ''
let g:ctrlp_switch_buffer = "vt"
let g:ctrlp_root_markers = ['Gemfile']
" let g:ctrlp_prompt_mappings = {
" \ 'PrtSelectMove("j")': ['<c-j>', '<c-n>', '<down>'],
" \ 'PrtSelectMove("k")': ['<c-k>', '<c-p>', '<up>'],
" \ 'PrtHistory(-1)': [],
" \ 'PrtHistory(1)': [],
" \}
"
let g:rbpt_colorpairs = [
\ ['brown', 'RoyalBlue3'],
\ ['Darkblue', 'SeaGreen3'],
\ ['darkgray', '#FF9CFE'],
\ ['darkgreen', '#96CBFE'],
\ ['darkcyan', 'RoyalBlue3'],
\ ['darkred', 'SeaGreen3'],
\ ['darkmagenta', '#FF9CFE'],
\ ['brown', '#96CBFE'],
\ ['gray', 'RoyalBlue3'],
\ ['black', 'SeaGreen3'],
\ ['darkmagenta', '#FF9CFE'],
\ ['Darkblue', '#96CBFE'],
\ ['darkgreen', 'RoyalBlue3'],
\ ['darkcyan', 'SeaGreen3'],
\ ['darkred', '#FF9CFE'],
\ ['red', '#96CBFE'],
\ ]


autocmd FileType css,scss,less set iskeyword=@,48-57,_,-,?,!,192-255
1 change: 1 addition & 0 deletions bundle/optional/YouCompleteMe
Submodule YouCompleteMe added at 011af9
1 change: 1 addition & 0 deletions bundle/optional/ctrlp-cmatcher
Submodule ctrlp-cmatcher added at cfe5bf
21 changes: 21 additions & 0 deletions bundle/optional/elixir-lang-vim-elixir-a4fbd1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# vim-elixir

This project contains some Vim configuration files to work with [Elixir](http://elixir-lang.org).

So far it's included:

* Syntax highlighting

* Filetype detection

* Auto indentation

## Install

* Copy the files to your `~/.vim` directory.

* If you use vim-pathogen you can clone this repo into `~/.vim/bundle`

## Snippets

If you are looking for snipmate snippets take a look at: [elixir-snippets](https://github.com/carlosgaldino/elixir-snippets)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
au BufRead,BufNewFile *.ex,*.exs set filetype=elixir
au FileType elixir setl sw=2 sts=2 et
12 changes: 12 additions & 0 deletions bundle/optional/elixir-lang-vim-elixir-a4fbd1/ftplugin/elixir.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
" Vim filetype plugin
" Language: Elixir
" Maintainer: Carlos Galdino <carloshsgaldino@gmail.com>
" URL: https://github.com/elixir-lang/vim-elixir

if (exists("b:did_ftplugin"))
finish
endif
let b:did_ftplugin = 1

setlocal comments=:#
setlocal commentstring=#\ %s
74 changes: 74 additions & 0 deletions bundle/optional/elixir-lang-vim-elixir-a4fbd1/indent/elixir.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
" Vim indent file
" Language: Elixir
" Maintainer: Carlos Galdino <carloshsgaldino@gmail.com>
" Last Change: 2012 Mar 28

if exists("b:did_indent")
finish
endif
let b:did_indent = 1

setlocal indentexpr=GetElixirIndent(v:lnum)
setlocal indentkeys+==end,=else:,=match:,=elsif:,=catch:,=after:,=rescue:

if exists("*GetElixirIndent")
finish
endif

let s:elixir_indent_keywords = '\%(\<\(case\|if\|unless\|try\|loop\|receive\)\>\|' .
\ '^\s*\(defmodule\|defimpl\|defmacro\|defdelegate\|defexception\|defp\|def\|test\|[a-z]\w*\(:\)\@=\)\|' .
\ 'fn(.*)\s\(do\|->\)$\)'

let s:elixir_clauses = '\(else\|match\|elsif\|catch\|after\|rescue\):\|end'

function! s:BlockStarter(lnum, block_start_re)
let lnum = a:lnum
let maxindent = 10000
while lnum > 1
let lnum = prevnonblank(lnum - 1)
if indent(lnum) < maxindent
if getline(lnum) =~ a:block_start_re
return lnum
else
let maxindent = indent(lnum)
if maxindent == 0
return -1
endif
endif
endif
endwhile
return -1
endfunction

function! GetElixirIndent(line_num)
" don't indent if it's the first line of the file
if a:line_num == 0
return 0
endif

let this_line = getline(a:line_num)

if this_line =~ s:elixir_clauses
let bslnum = s:BlockStarter(a:line_num, s:elixir_indent_keywords)
if bslnum > 0
return indent(bslnum)
else
return -1
endif
endif

let plnum = a:line_num - 1
let previous_line = getline(plnum)

if previous_line =~ '\(do\|when\|->\)$\|^\s*\(if\>\|[a-z]\w*\(:\)\@=\)'
return indent(plnum) + &sw
endif

" blank lines are indented based on the previous not blank line"
if previous_line =~ '^\s*$'
let nonblank = prevnonblank(a:line_num)
return indent(nonblank)
endif

return indent(plnum)
endfunction
82 changes: 82 additions & 0 deletions bundle/optional/elixir-lang-vim-elixir-a4fbd1/syntax/elixir.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
" Vim syntax file
" Language: Elixir
" Maintainer: Carlos Galdino <carloshsgaldino@gmail.com>
" Last Change: 2012 May 28

if exists("b:current_syntax")
finish
endif

" syncing starts 2000 lines before top line so docstrings don't screw things up
syn sync minlines=2000

syn match elixirComment '#.*'

syn match elixirKeyword '\<\%(case\|cond\|end\|bc\|lc\|if\|unless\|try\|loop\|receive\|fn\)\>[?!]\@!'
syn match elixirKeyword '\<\%(defmodule\|defprotocol\|defimpl\|defrecord\|defmacrop\?\|defdelegate\|defexception\|defp\?\)\>[?!]\@!'
syn match elixirKeyword '\<\%(exit\|raise\|throw\|after\|rescue\|catch\|else\)\>[?!]\@!'
syn match elixirKeyword '\<\%(do\|->\)\>\s*'
syn match elixirKeyword '\<\%(import\|require\|use\|recur\|quote\|unquote\|super\|alias\)\>[?!]\@!'

syn match elixirOperator '\<\%(and\|not\|or\|when\|xor\|in\)\>'
syn match elixirOperator '%=\|\*=\|\*\*=\|+=\|-=\|\^=\|||='
syn match elixirOperator "\%(<=>\|<\%(<\|=\)\@!\|>\%(<\|=\|>\)\@!\|<=\|>=\|===\|==\|=\~\|!=\|!\~\|?[ \t]\@=\)"
syn match elixirOperator "!+[ \t]\@=\|&&\|||\|\^\|\*\|+\|-\|/"
syn match elixirOperator "|\|++\|--\|\*\*\|\/\/\|<-\|<>\|<<\|>>\|=\|\."

syn match elixirSymbol '\(:\)\@<!:\%([a-zA-Z_]\w*\%([?!]\|=[>=]\@!\)\?\|<>\|===\?\|>=\?\|<=\?\)'
syn match elixirSymbol '\(:\)\@<!:\%(<=>\|&&\?\|%\(()\|\[\]\|{}\)\|++\?\|--\?\|||\?\|!\|//\|[%&`/|]\)'
syn match elixirSymbol "\%([a-zA-Z_]\w*\([?!]\)\?\):\(:\)\@!"

syn match elixirName '\<nil\>[?!]\@!\|\<[A-Z]\w*\>'

syn match elixirBoolean 'true\|false'

syn match elixirVariable '@[a-zA-Z_]\w*\|&\d'

syn match elixirPseudoVariable '\<__\%(FILE\|MODULE\|MAIN\|ENV\|CALLER\)__\>[?!]\@!'

syn match elixirNumber '\<\d\(_\?\d\)*\(\.[^[:space:][:digit:]]\@!\(_\?\d\)*\)\?\([eE][-+]\?\d\(_\?\d\)*\)\?\>'
syn match elixirNumber '\<0[xX][0-9A-Fa-f]\+\>'
syn match elixirNumber '\<0[bB][01]\+\>'

syn match elixirRegexEscape "\\\\\|\\[aAbBcdDefGhHnrsStvVwW]\|\\\d\{3}\|\\x[0-9a-fA-F]\{2}" contained
syn match elixirRegexEscapePunctuation "?\|\.\|*\|\[\|\]\|+\|\^\|\$\||\|(\|)\|{\|}" contained
syn match elixirRegexQuantifier "[*?+][?+]\=" contained display
syn match elixirRegexQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display
syn match elixirRegexCharClass "\[:\(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|xdigit\):\]" contained display

syn region elixirRegex matchgroup=elixirDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial

syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier
syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass

syn region elixirString matchgroup=elixirDelimiter start="'" end="'"
syn region elixirString matchgroup=elixirDelimiter start='"' end='"' contains=@elixirStringContained
syn region elixirInterpolation matchgroup=elixirDelimiter start="#{" end="}" contained contains=ALLBUT,elixirComment
syn region elixirDocString start=+"""+ end=+"""+
syn region elixirDocString start=+'''+ end=+'''+

syn match elixirSymbolInterpolated ':\("\)\@=' contains=elixirString
syn match elixirString "\(\w\)\@<!?\%(\\\(x\d{1,2}\|\h{1,2}\h\@!\>\|0[0-7]{0,2}[0-7]\@!\>\|[^x0MC]\)\|(\\[MC]-)+\w\|[^\s\\]\)"

hi def link elixirComment Comment
hi def link elixirKeyword Keyword
hi def link elixirOperator Operator
hi def link elixirSymbol Constant
hi def link elixirPseudoVariable Constant
hi def link elixirName Type
hi def link elixirBoolean Boolean
hi def link elixirVariable Identifier
hi def link elixirNumber Number
hi def link elixirDocString Comment
hi def link elixirInterpolation Delimiter
hi def link elixirSymbolInterpolated elixirSymbol
hi def link elixirRegex elixirString
hi def link elixirRegexEscape elixirSpecial
hi def link elixirRegexEscapePunctuation elixirSpecial
hi def link elixirRegexCharClass elixirSpecial
hi def link elixirRegexQuantifier elixirSpecial
hi def link elixirSpecial Special
hi def link elixirString String
hi def link elixirDelimiter Delimiter
Loading

0 comments on commit d46ad88

Please sign in to comment.