Skip to content

Commit

Permalink
Plugin delimitMate
Browse files Browse the repository at this point in the history
Finally, we've made Vim smart enough to insert matching delimiters, like
quotes, parentheses, and curly braces, automatically!
  • Loading branch information
jez committed Feb 25, 2015
1 parent 1e5757e commit 2fe0507
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions vimrc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ Plugin 'vim-scripts/a.vim'
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'

" ----- Other text editing features -----------------------------------
Plugin 'Raimondi/delimitMate'

call vundle#end()

filetype plugin indent on
Expand Down Expand Up @@ -114,3 +117,14 @@ hi clear SignColumn
let g:airline#extensions#hunks#non_zero_only = 1


" ----- Raimondi/delimitMate settings -----
let delimitMate_expand_cr = 1
augroup mydelimitMate
au!
au FileType markdown let b:delimitMate_nesting_quotes = ["`"]
au FileType tex let b:delimitMate_quotes = ""
au FileType tex let b:delimitMate_matchpairs = "(:),[:],{:},`:'"
au FileType python let b:delimitMate_nesting_quotes = ['"', "'"]
augroup END


4 comments on commit 2fe0507

@jez
Copy link
Owner Author

@jez jez commented on 2fe0507 Feb 26, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(<-- prev step) ... (next step -->)

Installing a plugin doesn't get you much unless you read the documentation!

@bezi
Copy link

@bezi bezi commented on 2fe0507 Feb 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unable to replicate the latex matchpairs behaviour with

au FileType tex let b:delimitMate_matchpairs = "(:),[:],{:},`:'"

Any thoughts?

@jez
Copy link
Owner Author

@jez jez commented on 2fe0507 Feb 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm not sure what's up here. I just verified that a fresh clone of the repository has this functionality enabled. Let us know if you are able to identify the problem.

@bezi
Copy link

@bezi bezi commented on 2fe0507 May 9, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: It's a collision with another plugin that I think was resolved when I put all the respective autocommands into augroups. Weird, not too concerned to dig into.

Please sign in to comment.