Sublime Forum

Virtual space

#21

this is a reworked version of a command i used for some time.
it does address the problem @gpfsmurf had.
it’s improved version of Sublime’s “Add next/previous” line in that respect that it expands the selection by placing the new region in the same column even if the line is shorter.
It also solves one annoyance i had with sel placement i tried to explain here http://sublimetext.userecho.com/topic/123237-correct-add-nextprevious-line-behaviour/
i hope someone might find it useful.

[quote=“gpfsmurf”]Current:

blah blahb|lah
|
asdhasdklj|dhaslkhdsalk
daskhask|
1237912623|9871263129836913

Proposed:

blah blahb|lah
          |
asdhasdklj|dhaslkhdsalk
daskhask  |
1237912263|9871263129836913

I can see uses for both behaviors, so having this as an option would be nice to have.[/quote]

0 Likes

#22

Another vote for virtual space. My daily IDE has virtual space. I use sublime text for everything else. Virtual space is not a make or break feature for me but it would be very awesome to have in Sublime Text. It sounds like a small feature, but once you’ve grown accustomed to it, it’s hard to go back.

0 Likes

#23

April 2017, apparently this feature is still not there.
One of the few that prevent me from completely adopting ST3…

0 Likes

#24
0 Likes

#25

:+1: Essential text editor feature, hope it gets implemented

I’m checking out sublime text atm but having to go back because of this (for now!)

0 Likes

#26

I’m also interested in this. I found this plugin that could be helpful

https://packagecontrol.io/packages/Equalize

Is there a way to access the clipboard and modify it on the fly, to strip trailing whitespaces copied from a such a selection?

0 Likes

#27

Yes, there are get_clipboard and set_clipboard methods in the sublime module.

As an example, I wrote this plugin for someone that wanted something similar.

In the example, the idea is copying results from a Find in Files result, automatically throwing away the line numbers at the start. However you could easily swap the regex for one that strips trailing white space.

0 Likes

#28

Cool, thanks!

0 Likes

#29

I also vote for the virtual space

0 Likes

#30

I advocate for this feature. It would be most useful to me when creating markdown tables and for documenting source code.

0 Likes

#31

Just made a plugin for this, some feedback would be appreciated, thanks.

1 Like

#32

Your plugin looks great!

Is it possible to modify it to edit document in Virtual Space mode (to set cursor anywhere beyound the end of line)? …

0 Likes

#33

I think you can do it already. By default, it exits virtual space on copy/cut, but you can set exit_on_copy to false to stay in virtual space mode until you deactivate it again. About whole file, you can increase safe_size to the value you prefer, I don’t know if it can cause slowdowns for huge files(I didn’t try it), if the size is bigger than that value virtual space is limited to a number of lines around the starting cursor(100 up and down by default).

Also, there is still a limit to how far you can go, it depends on view wrap settings, but you can set use_longest_row to true, to expand all lines to the longest row in the file.

0 Likes

#34

Thank you! ) … Try to make it

0 Likes