Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-26 Thread elextr
> Ok @elextr you talked me into looking into the code finally.

Heh, I wasn't actually trying to do that, but while you are there, "just" a 
menu item and keybinding to go. :grin:

I was actually trying to suggest to be patient until the Scintilla 4 upgrade, 
the "it needs c++17" excuse is getting thinner by the day, will have to happen 
soon :smile:

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-535741514

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-26 Thread AdamDanischewski
Ok @elextr you talked me into looking into the code finally. I've got it 
working with the current Scintilla.
### line 167 geany/scintilla/src/Editor.cxx:   
**from** `multiPasteMode = SC_MULTIPASTE_ONCE;`
**to** `multiPasteMode = SC_MULTIPASTE_EACH;`
![vertical_paste_fix](https://user-images.githubusercontent.com/10157303/65728722-cdd5e800-e089-11e9-8d12-cbe4c6934a94.gif)


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-535706906

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-26 Thread elextr
Note, beware that most of the Scintilla multiple selection documents section is 
only for Scintilla 4, which Geany does not use, and which could allow the whole 
area of rectangular/multiple selections and pastes to be re-assessed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-535682599

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-26 Thread elextr
@AdamDanischewski in this case you don't need an option, just put both items in 
the menu, and make both keybindable and bind one or both by default.

But note that I doubt that multipaste will help with pasting the output of 
`send selection to` since it would paste the multiple lines on every line I 
think (unless somebody checks Scintilla code or tries it and finds its 
different).  There doesn't seem to be a way of telling Scintilla that the paste 
is a rectangular select, it says "Rectangular selections are handled as 
multiple selections although the original rectangular range is remembered so 
that subsequent operations may be handled differently for rectangular 
selections" and "pasting a rectangular selection places each piece in a 
vertical column." meaning the "rectangularness" is remembered internally to 
Scintilla somehow and is unlikely to be a property of the results of `send to 
selection`?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-535678348

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-26 Thread AdamDanischewski
@Akronix I agree with your sentiments on this. 
@elextr I would be fine with there being an option for it. 

Perhaps it could be the default provided no one can give a better use case for 
it not being. To only paste one line when a vertical multiple line 
selection/rectangular selection were held on prior to pasting seems to imply 
that a user error is being corrected since it ignores the additional user 
efforts. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-535602733

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-25 Thread elextr
Voting?  Why is it that everyone wants to cut off an option thats useful in 
some situations in favour of an option thats useful in others, as I said on 
#850 why not have __BOTH__ and which is default can be set from an option.

[start rant] I'm getting sick of people who assert that their preferred way is 
the only way of doing something and all other ways must be suppressed because 
_they_ want it that way or because some other tool does it that way.  It feels 
like every second pull request is to drop something useful in some use cases 
and replace it with something thats useful in a _different_ set of use-cases.  
Somebody always has to lose.  Folks lets try adding value here, not slicing it 
ever thinner so the tools are only useful for a small for a narrower and 
narrower user space. [end rant, sorry @AdamDanischewski to hijack your PR]

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-535196845

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-25 Thread Abel Serrano Juste
I still strongly think that a single-line copy should paste repeatedly in as 
many lines selected as they are. That's why you did the multi-line selection 
after copying and that's the quickest way to append certain text to lines that 
are similar in structure (like tabular data for instance). I think this would 
make the multi-line selection much more useful, at least for me.
Another good point to make it work this way is that it would be consistent with 
the behaviour of many other popular editors.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-535111758

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-25 Thread AdamDanischewski
@ntrel Yea, I played around with it before and it's expected behavior. I kind 
of think multi-paste should work the way @Akronix mentioned in #850. If you 
have one line and then make a vertical selection (rectangular selection) that 
it multi-pastes across the entire selection but there's still some debate about 
it. Maybe a vote would help?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-535054702

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-25 Thread elextr
To expand, basically its the Scintilla paste into rectangular selections 
default behaviour.  Scintilla does have another option SCI_MULTI_PASTE to do it 
differently, but I'm not sure how much use it would be in this use-case.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534907116

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-25 Thread elextr
`Send selection to` pastes its result into the selection, thats why its the 
same issue.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534904028

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-25 Thread Nick Treleaven
@elextr actually those issues are about pasting, not about Send selection to. 
Surely that's a separate issue?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534901991

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-25 Thread Nick Treleaven
Ok, thanks Lex

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534901363

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-25 Thread elextr
> I've tried using the Send Selection To --> interface but it doesn't paste 
> back across the vertical selection.

Yep thats known behaviour see also #625 #841 #850 #1083 several of which were 
opened by or commented on by one@AdamDanischewski (mentioning no names :)

This whole thing will need to be examined if Geany ever moves to Scintilla 4 
where rectangular selections have become multi-selections if I remember the 
Scintilla ML discussion correctly.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534900845

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-25 Thread Nick Treleaven
> I've tried using the Send Selection To --> interface but it doesn't paste 
> back across the vertical selection.

@AdamDanischewski if you have time, could you file this as a separate issue 
please? Note the manual calls 'vertical selection' rectangular selection.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534886160

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-24 Thread AdamDanischewski
Closed #2317.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#event-2659856736

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-24 Thread AdamDanischewski
@intact Yep yep! That plugin does the job - thanks! I didn't notice it for some 
reason. 

If you are running Geany 1.36 you can add them by: 
```
$> git clone https://github.com/geany/geany-plugins.git
$> ./autogen.sh 
$> ./configure 
$> make 
$> mkdir mylib; find . -type f -name '*.so' -exec cp {} mylib/ \;

```
Then in Geany, add the plugin path: Edit->Preferences->Extra Plugin Path 
(add /path/to/mylib).  

@LarsGit223  If you look at the plugin there looks like there is unfinished 
implementation of incrementing letters too. That would probably come in handy 
from time to time, so maybe keeping it flexibly named with "Increment" vs 
enumerate would be easier over the long haul. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534723786

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-24 Thread LarsGit223
@intact: ooops, of course. Did totally oversee that.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534697093

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-24 Thread intact
Maybe you can check 
[Geanyinsertnum](https://plugins.geany.org/geanyinsertnum.html) plugin.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534680756

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-24 Thread LarsGit223
As an alternative to the possible feature name _"Increment selection"_ I 
suggest _"Enumerate selection"_.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534663769

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-24 Thread Nick Treleaven
It should be possible to configure a *Format->Send selection to* command with 
awk to do this. Although Windows users won't have awk (perhaps we could bundle 
it if small enough). Also perhaps some preset awk commands with meaningful 
labels would help.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534613249

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-24 Thread LarsGit223
@AdamDanischewski: thanks, I think we have enough information :smile: IMHO this 
can be implemented in a new plugin or maybe better as an extension of the 
Line-Operations plugin.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534599209

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-24 Thread AdamDanischewski
Sublime also has Increment Selection - I guess that's what it should be 
called?? - available via the Increment Selection package: 
![9kBFH](https://user-images.githubusercontent.com/10157303/65513663-a9bbb080-dea9-11e9-8186-247ff82f251f.gif)
https://stackoverflow.com/questions/14640093/how-to-insert-a-column-of-increasing-numbers-in-sublime-text-2/44384986
https://packagecontrol.io/packages/Increment%20Selection


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534547978

Re: [Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-24 Thread AdamDanischewski
This feature is also available in Visual Studio via extension: 
![demo](https://user-images.githubusercontent.com/10157303/65512377-13868b00-dea7-11e9-9f41-3defd5c06daa.gif)
https://marketplace.visualstudio.com/items?itemName=albymor.increment-selection
https://github.com/albymor/Increment-Selection

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317#issuecomment-534539941

[Github-comments] [geany/geany] Enhancement - Vertical Editing Sequential Numbering (#2317)

2019-09-23 Thread AdamDanischewski
I've been searching for vertical editing sequential numbering, I've found: 
https://www.emeditor.com/text-editor-features/coding/multiple-selection-editing/how-to-use-vertical-editing/

On vertical selection, a menu option allows for sequential numbering to be 
inserted. This would be a welcome addition to Geany. It probably would be 
best/proper to add it to Scintilla but it could probably be added to Geany by 
cycling over the vertical selections or prior to paste. 
![geany_feat](https://user-images.githubusercontent.com/10157303/65474182-e2776d80-de48-11e9-90f3-e35b33072b51.gif)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2317