Is there a command to insert a character string in Sublime Text 2?

I use hash and dash lines to format and split code files (like CSS files):

/* ------------------------------------------------------------------- * Layout Styles * -----------------------------------------------------------------*/ 

In vim I would use the 80a-<ESC> command, which inserted 80 characters from the location after the cursor .

I searched the Sublime documentation, but did not find a good way to replicate the above vim command to subl . Vintage mode does not include support for this sequence of commands.

Is there a corresponding command that does something similar in Sublime, or is a static fragment the easiest solution?

+8
sublimetext
source share
1 answer

I do not think there is a possibility of repetition. To do this with any character that I think the plugin will require, but the basic functionality of inserting a large block of comments can be easily done using a snippet:

Go to New Snippet through the menu and add this code:

 <snippet> <content> <![CDATA[ /* ------------------------------------------------------------------- * $0 * -----------------------------------------------------------------*/ ]]> </content> <tabTrigger>comment</tabTrigger> </snippet> 

then save the fragment in the Packages\User folder as something.sublime-snippet . This should work right away, you just need to type comment (or whatever you change to ..), then press tab and then write your comment.

+10
source share

All Articles