Skip to content

Commit d3d964a

Browse files
haulethkassio
authored andcommitted
Add support for vim-surround (#205)
* Add support for vim-surround * Add description to new variables
1 parent ff74b37 commit d3d964a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ftplugin/eelixir.vim

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,23 @@ if exists("loaded_matchit")
7878
let b:match_words = s:match_words
7979
endif
8080

81+
if !exists('b:surround_45')
82+
" When using surround `-` (ASCII 45) would provide `<% selection %>`
83+
let b:surround_45 = "<% \r %>"
84+
endif
85+
if !exists('b:surround_61')
86+
" When using surround `=` (ASCII 61) would provide `<%= selection %>`
87+
let b:surround_61 = "<%= \r %>"
88+
endif
89+
if !exists('b:surround_35')
90+
" When using surround `#` (ASCII 35) would provide `<%# selection %>`
91+
let b:surround_35 = "<%# \r %>"
92+
endif
93+
if !exists('b:surround_5')
94+
" When using surround `<C-e>` (ASCII 5 `ENQ`) would provide `<% selection %>\n<% end %>`
95+
let b:surround_5 = "<% \r %>\n<% end %>"
96+
endif
97+
8198
setlocal comments=:<%#
8299
setlocal commentstring=<%#\ %s\ %>
83100

0 commit comments

Comments
 (0)