Enclose

Enclose

This module provides additional enclose commands

Functions

Link

Github

Preset keybindings

keys["'"] = function() enclose_selection("'", "'") end
keys['"'] = function() enclose_selection('"', '"') end
keys['('] = function() enclose_selection('(', ')') end
keys['['] = function() enclose_selection('[', ']') end
keys['function()'] = function() enclose_selection('function()', '}') end

keys["c'"] = function() paste_or_grow_enclose("'", "'") end
keys['c"'] = function() paste_or_grow_enclose('"', '"') end
keys['c('] = function() paste_or_grow_enclose('(', ')') end
keys['c['] = function() paste_or_grow_enclose('[', ']') end
keys['cfunction()'] = function() paste_or_grow_enclose('function()', '}') end

Edited on Friday, October 21st 2016 at 5:29 PM.