Lintalist 1.9 Searchable interactive lists to copy & paste text with plugins

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

Re: Lintalist 1.4 Searchable interactive lists 2 copy&paste

18 Mar 2015, 17:11

I modified the font at least in the boxes where the snippets are displayed and editted. It required a handful of changes but in two files as the editor is a separate file. If you decide to make it an option it should be fairly easy.

Also the Listview did not appear to be calculating the column widths correctly which caused there to be blank space left at the right of the columns.

I made changes in UpdateLVColWidth that made things display better for me.

Code: Select all

UpdateLVColWidth()
	{
	 global
	 local c4w
	 LV_ModifyCol(5,0) ; hidden Bundle_Index column, always hide

	 c1w:=Round((Width - 50 - 60) / 2) - 3
	 c2w:=c1w

	 If (Col3 = 0)     ; shortcut column
		{
		 LV_ModifyCol(3,0)
		 c2w += 25
		 c1w += 25
		}
	 Else
		LV_ModifyCol(3,50)

	 If (Col4 = 0)     ; abbreviation/shorthand column
		{
		 LV_ModifyCol(4,0)
	 	 c1w += 30
		 c2w += 30
		}
	 Else
		LV_ModifyCol(4,60)

	 If (Col2 = 0)           ; paste2 column is empty so no need to show
		{
		 c1w += c2w
		 LV_ModifyCol(1,c1w) ; col1 is paste1 column
		 LV_ModifyCol(2,0)   ; no second part so don't show
		}
	 Else
		{
		 LV_ModifyCol(1,c1w) ; col1 is paste1 column
		 LV_ModifyCol(2,c2w) ; paste2 column has content so show it
		}
	}
FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.4 Searchable interactive lists 2 copy&paste

19 Mar 2015, 05:39

Thanks I'll look it over.

I'm already experimenting with configurable fonts & size and displaying the bundle name in the search results, also configurable) and I've done some initial testing with colouring each row depending on the bundle where the snippet comes from. Using colours does add a bit of a lag while scrolling but as it is a optional feature you don't have to use it.
Attachments
lvfontcolor.png
font, font size, bundle name & colour
lvfontcolor.png (10 KiB) Viewed 8853 times
User avatar
FanaticGuru
Posts: 1906
Joined: 30 Sep 2013, 22:25

Re: Lintalist 1.4 Searchable interactive lists 2 copy&paste

24 Mar 2015, 17:30

I made some changes to sort by a default column. I prefer to always have the snippets sorted by the second paste column.

If you click on a column header it will of course sort by that column like normal but now it remembers that choice through openings of the Gui and searches. It does not actually save the setting to the hard drive though like a true preference although adding the default column in the preferences instead of hard coding it in the Default settings would be nice.

It required 4 changes shown below in the lines that have SortCol in them if you want to consider it for a future update.

Code: Select all

; Default settings
#NoEnv
#SingleInstance, force
SetBatchLines, -1
SetTitleMatchMode, 2
ListLines, off
TmpDir:= A_ScriptDir "\tmpscrpts"
CoordMode, ToolTip, Screen
SendMode, Input
SetKeyDelay, -1
SetWorkingDir, %A_ScriptDir%
FileEncoding, UTF-8
SortCol := 2

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

If (CurrHits = 1)
	{
	 if (AutoExecuteOne = 1)
		Gosub, paste
	 else if (AutoExecuteOne = 2)
		Gosub, shiftenter
	}
	LV_ModifyCol(SortCol,"Logical Sort")
Return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; (Double)click in listview, action defined in INI
Clicked:
	if (A_GuiEvent = "ColClick")
		SortCol := A_EventInfo

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

	 If (Col2 = 0)           ; paste2 column is empty so no need to show
		{
		 c1w += c2w
		 LV_ModifyCol(1,c1w) ; col1 is paste1 column
		 LV_ModifyCol(2,0)   ; no second part so don't show
		}
	 Else
		{
		 LV_ModifyCol(1,c1w) ; col1 is paste1 column
		 LV_ModifyCol(2,c2w) ; paste2 column has content so show it
		}
	LV_ModifyCol(SortCol,"Logical Sort")
	}
FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts
AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon
Hotstring Manager - Create and Manage Hotstrings
[Class] WinHook - Create Window Shell Hooks and Window Event Hooks
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.4 Searchable interactive lists 2 copy&paste

25 Mar 2015, 15:10

Thanks - sorting would be a nice addition, I've added it to the list https://github.com/lintalist/lintalist/issues/21
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.4 Searchable interactive lists 2 copy&paste

02 Apr 2015, 13:53

Just a heads up: there is a beta release of v1.5

And before I start tackling all other issues* - https://github.com/lintalist/lintalist/issues/ - I want to release v1.5 as there are a number of changes that could break things, please test it out and report any issues if you find them.

Most important changes:
To test it download:

https://github.com/lintalist/lintalist/archive/dev.zip

and unpack the zip file, close your current running copy of Lintalist before starting de DEV version
You can copy your bundles to the bundle folder, as lintalist.exe is not included in the download of the source code you might need to copy lintalist.exe as well, otherwise simply start lintalist.ahk (you must have v.1.1.20+)

The "check for updates" option via the tray-menu has been disabled in this beta release.

* incl. new plugins currently being discussed are
- split plugin https://github.com/lintalist/lintalist/issues/23
- find & replace plugin https://github.com/lintalist/lintalist/issues/27
- and other items as well https://github.com/lintalist/lintalist/issues/

Feel free to post feedback at GH or here of course.
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.4 Searchable interactive lists 2 copy&paste

18 Apr 2015, 12:06

v1.5 https://github.com/lintalist/lintalist/ ... s/tag/v1.5

New features:
  • Omnisearch: the ability to search in all bundles independent of the ones that are currently loaded or locked in the search Gui. Doc http://lintalist.github.io/#Omni
  • Show bundle name in search results and/or use Colour to indicate bundle. Setting: DisplayBundle. Caveat: using colours might cause the Search GUI to freeze or to become unresponsive should this happen simply avoid using a DisplayBundle setting > 1.
  • Set font (typeface) and font size for search results and preview. Setting: Font and FontSize
  • New Bundle editor - editing bundle properties now independent of snippet. Delete a bundle using the editor.
  • minor changes & fixes.
See release notes https://github.com/lintalist/lintalist/ ... s/tag/v1.5 for install & update instructions.

Future updates will include:
Thanks for the feedback so far....
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.5 Searchable interactive lists 2 copy&paste

25 Apr 2015, 06:02

Just a heads up: there is a beta release of v1.6

You can download a new early beta release here:
https://github.com/lintalist/lintalist/archive/dev.zip

It would be advisable to install this in a new folder and not overwrite your current install of Lintalist. You can copy your bundles to the new folder as well - existing snippets should still work as in previous versions.

Changes
  • new plugin parser - try to "break" it
  • new Split plugin *
More info posted here https://github.com/lintalist/lintalist/issues/37

* a usage example could be: you select a number of columns in your spreadsheet, copy that to the clipboard and you can now use the split plugin to use each cell and insert that into specific locations in your snippet.

Feel free to post feedback at GH or here of course.
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.5 Searchable interactive lists 2 copy&paste text

15 Aug 2015, 04:40

Probably / hopefully last beta release of v1.6 - various fixes and new features including: sorting columns using various methods + quick sort hotkeys and setting the width of columns 1 & 2 - see https://github.com/lintalist/lintalist/ ... -131321555 and the https://github.com/lintalist/lintalist/ ... angelog.md for details.

Feedback welcome!
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.5 Searchable interactive lists 2 copy&paste text

23 Aug 2015, 03:59

v1.6 is now available. You can use the tray menu, check for updates, to upgrade, or download it manually via https://github.com/lintalist/lintalist/releases
  • New: Split & SplitRepeat plugins (*1)
  • New: You can now create counters "on the fly"
  • New: Column: width settings for column 1 and column 2
  • New: Column sort settings and quick sort hotkeys
  • Change: improved parsing of nested plugins
  • Change: new options for Calendar and File plugins
  • Change/fix: chaining HTML/MD snippets now allowed
  • Various minor improvements, code refactoring (see changelog for details)
*1 Split & SplitRepeat
The Split plugin creates an "array" of sequentially numbered temporary variables which you can place anywhere in your snippet. This can for example be useful if you copy multiple columns and / or rows from a spreadsheet and want to insert them at specific locations in your snippet.
See the documentation http://lintalist.github.io/#Split for more informations and basic examples.

Feedback welcomed!
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.6 Searchable interactive lists to copy & paste text with plugins

10 Oct 2015, 03:24

Just a heads up, a new beta is available, v1.7:
  • New: SearchLetterVariations setting - Allow for variations of letters in search query - 'e' also searches for 'eéèë...' etc
  • New: SnippetEditor Setting - Allow user to set editor to use for "Edit in Editor"
  • New: PlaySound Setting - Play sounds after paste, open or close of Search Gui (beeps, default Windows media or user files)
  • New: added help menu with 'Help' and 'About' options to the GUIs and added 'About' to tray menu
  • Minor fixes and code refactoring.
I'd be interested to hear any feedback on the search results if you use this version, especially if they are unexpected or different from previous versions.
Adding SearchLetterVariations meant I had to change some underlying code for the various search methods which now makes more of use Regular Expressions which could mean results are different or displaying the results of a fuzzy search has become slower.
(For the PlaySound option: there are no sound files included, just look at sound.ini in the lintalist folder for instructions where to place them.)

Download the ZIP and unpack it to a folder of your choice:
https://github.com/lintalist/lintalist/archive/dev.zip

Feedback welcome: https://github.com/lintalist/lintalist/issues/49 or here of course.
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.7 Searchable interactive lists to copy & paste text with plugins

16 Jan 2016, 04:15

v1.7 is now available. You can use the tray menu, check for updates, to upgrade, or download it manually via https://github.com/lintalist/lintalist/releases
  • New: SearchLetterVariations setting - Allow for variations of letters in search query - 'e' also searches for 'eéèë...' etc
  • New: SnippetEditor Setting - Allow user to set editor to use for "Edit in Editor".
  • New: PlaySound Setting - Play sounds after paste, open or close of Search Gui (beeps, default Windows media or user files).
  • New: Added help menu with 'Help' and 'About' options to the GUIs and added 'About' to tray menu.
  • New: Split plugin now accepts "named Split" [[split_name]].
  • Fix: Tray menu: manage bundles and manage local variables weren't working.
  • Fix: Always resolve Vars in nested situations.
  • Various other minor fixes, code refactoring and documentation.
Upgrading:
  • If you are upgrading to this new release, you can use the tray menu option "Check for updates" and have it done automatically.
  • If you prefer to do it manually, please use the following procedure:
    • close your running copy of Lintalist first
    • unpack the zip file and overwrite all files. Note: any (changed) bundles and settings will not be overwritten



A quick note about the "named splits" - just in case you're wondering how useful the [[split]] plugin is, here is a short example how you can use it to create a Snippet with "logic".
You can use Choice (or another Plugin) to select an item and use that output to update other parts of the snippet.
[[Split_C1=[[choice=1 Option1|2 Option2|3 Option3|4 Option4]]|\t]]
[[Split_CSub=sub1 sub2 sub3 sub4|\s]]

You made Choice Number [[SP_C1=1]]
And the sub-selection that goes with it is:
[[SP_CSub=[[SP_C1=1]]]]
This will ask you to make a Choice from Option1..4, and if you pick Option3 it will use "3" as a selection criteria for another Split.
So if the above snippet would have the following output (if you select Option3):
You made Choice Number 3
And the sub-selection that goes with it is:
sub3
Another example can be found here http://lintalist.github.io/#combiningsplit
lblb
Posts: 190
Joined: 30 Sep 2013, 11:31

Re: Lintalist 1.7 Searchable interactive lists to copy & paste text with plugins

19 Jan 2016, 00:53

Hi list,
Thanks a lot for Lintalist, the more I use it, the more I like it!

I've been using shorthands to inserts text snippets and it's been working great. Is there any way to format the text that is pasted though? Specifically, is it possible to have certain letters of the pasted text to be superscripted or subscripted?

Thanks for all your work on this!
list-nli

Re: Lintalist 1.7 Searchable interactive lists to copy & paste text with plugins

19 Jan 2016, 02:56

Glad you like it :-)
Yes, you can use the [[html]] plugin for that purpose (see "Formatted Text Snippets" in the documentation)

Short example, add [[html]] anywhere in the snippet, and use the HTML tags SUB or SUP and it should work.

Code: Select all

[[html]]
CO<sub>2</sub> or 2<sup>2</sup> = 2
Of course the application would have to accept formatted html text so it might not work everywhere.
lblb
Posts: 190
Joined: 30 Sep 2013, 11:31

Re: Lintalist 1.7 Searchable interactive lists to copy & paste text with plugins

19 Jan 2016, 03:11

Oh, beautiful! I am also impressed that, as demonstrated by your example, you guessed that I needed this for a string that involved a chemical compound...

Thanks for the quick reply. I'll continue exploring your program, but man, it's impressive!
Guest

Re: Lintalist 1.7 Searchable interactive lists to copy & paste text with plugins

28 Mar 2016, 16:43

This is truly awesome tool. I love the idea of search, as I don’t need to remember the weirdest of keystrokes to match the snippets. Thank you for creating this great tool.

I have a request regarding the snippet completion, is there a way to have tab locations, and multiple edits. Here is an example. Using multiple edit, I can type text1 at two locations, and tab press, will take it to text2 location and finally it will be ended inside the for loop.
for (i=0, i < number, i++){

}

Input
====
for (text1=0, text1 < text2, i++){
^|
}
Thank you for your time.
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.7 Searchable interactive lists to copy & paste text with plugins

29 Mar 2016, 14:25

Guest wrote:This is truly awesome tool. I love the idea of search, as I don’t need to remember the weirdest of keystrokes to match the snippets. Thank you for creating this great tool.
Thank you, glad you like it. Indeed that was one of the reasons I made it as well ;)
Guest wrote:I have a request regarding the snippet completion, is there a way to have tab locations, and multiple edits. Here is an example. Using multiple edit, I can type text1 at two locations, and tab press, will take it to text2 location and finally it will be ended inside the for loop....
I know what you mean. There are indeed various text editors that support such multi-caret edits and have silent tab stops (notepad++ w. plugin, ultraedit, everedit, textadept, atom, st etc)

There are two questions:

1. Multi-caret editing: type text and have it inserted at multiple locations at the same time

Unfortunately it is not a standard Windows feature so making it work globably will be impossible.

Perhaps some editors will allow AutoHotkey to set multi-carets, this will have to be determined per program and implemented (if at all possible).
I will see if I can find something for any of the above mentioned editors.

An alternative would be to create a popup AutoHotkey-gui which would somehow allow this before pasting the snippet into the document.

2. Silent tab navigations/stops within a snippet

This is would be possible, it will probably never be foolproof but something pretty close to it.
It could either have silent tab stops:

this ^| is ^| a sentence ^| with various tab stops.

the snippet is pasted, all ^| are removed and the caret is positioned at the first ^|, if you would press TAB it would jump to the second and so on

It could also have predefined values which would be selected/highlighted so you can type directly and overwrite them (if you don't press TAB)

URLDownloadToFile, [[URL]], [[Filename]]

The line above is pasted, URL is selected so you can type or press TAB to move to and select FILENAME

It will always be a bit of hit and miss I think but perhaps I'll add this to as an experimental feature so that the user knows it isn't faultless and can test it to see if it works for them in particular situations and programs.

-------------

For the time being you can use this, it will ask you for two variables, by repeating the same INPUT it will replace them in two more locations.
for ([[Input=Var1]]=0, [[Input=Var1]] < [[Input=Var2]], i++){
^|
}
cricrazy

Re: Lintalist 1.7 Searchable interactive lists to copy & paste text with plugins

31 Mar 2016, 10:01

list wrote:
Guest wrote:This is truly awesome tool. I love the idea of search, as I don’t need to remember the weirdest of keystrokes to match the snippets. Thank you for creating this great tool.
Thank you, glad you like it. Indeed that was one of the reasons I made it as well ;)
Guest wrote:I have a request regarding the snippet completion, is there a way to have tab locations, and multiple edits. Here is an example. Using multiple edit, I can type text1 at two locations, and tab press, will take it to text2 location and finally it will be ended inside the for loop....
I know what you mean. There are indeed various text editors that support such multi-caret edits and have silent tab stops (notepad++ w. plugin, ultraedit, everedit, textadept, atom, st etc)

There are two questions:

1. Multi-caret editing: type text and have it inserted at multiple locations at the same time

Unfortunately it is not a standard Windows feature so making it work globably will be impossible.

Perhaps some editors will allow AutoHotkey to set multi-carets, this will have to be determined per program and implemented (if at all possible).
I will see if I can find something for any of the above mentioned editors.

An alternative would be to create a popup AutoHotkey-gui which would somehow allow this before pasting the snippet into the document.

2. Silent tab navigations/stops within a snippet

This is would be possible, it will probably never be foolproof but something pretty close to it.
It could either have silent tab stops:

this ^| is ^| a sentence ^| with various tab stops.

the snippet is pasted, all ^| are removed and the caret is positioned at the first ^|, if you would press TAB it would jump to the second and so on

It could also have predefined values which would be selected/highlighted so you can type directly and overwrite them (if you don't press TAB)

URLDownloadToFile, [[URL]], [[Filename]]

The line above is pasted, URL is selected so you can type or press TAB to move to and select FILENAME

It will always be a bit of hit and miss I think but perhaps I'll add this to as an experimental feature so that the user knows it isn't faultless and can test it to see if it works for them in particular situations and programs.

-------------

For the time being you can use this, it will ask you for two variables, by repeating the same INPUT it will replace them in two more locations.
for ([[Input=Var1]]=0, [[Input=Var1]] < [[Input=Var2]], i++){
^|
}
Hi List,

Thank you for your feedback and suggestions. As I said before, this is incredibly well thought out, I actually had PhraseExpander, which is pretty slick, but I put LintaList even higher than that. So thank you again.

I agree Multi Caret may not be supported by all applications, perhaps only by most text editors (I often use Notepad++, Vim and Sublime Text). I have been using Input plugin as you suggested. It has been helpful, but it may be even more useful with some form of gui, where, we can input all the variables and not one by one. It will also help to give a context of snippet, rather than just multiple input boxes.

Tab Stops can be super handy, when one uses snippets, even if its functionalities are limited to a certain editors. Please keep me posted with the updates. I would be willing to test it out.

I will add some more comments and feedback, but wanted to have this quick reply, to let you know that I really appreciate your time and help.
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.7 Searchable interactive lists to copy & paste text with plugins

31 Mar 2016, 13:10

Thanks - for reference (I'm not sure if you are in GH but you can open an account there if you like) - I've opened a few issues to keep track of progress

Multi-caret, tab stops
https://github.com/lintalist/lintalist/issues/61

Form / Gui related posts
https://github.com/lintalist/lintalist/issues/43
https://autohotkey.com/board/topic/1076 ... /?p=693070
The idea of the form/gui would be that you would see the text of the entire snippet in a Gui and edit it, probably using a HTML control as that would allow to translate the lintalist plugins to form elements (pulldown for choice, calendar, input fields etc). Or perhaps two methods, one simple Gui and one HTML page (= Long way off, but fun to mull over ).
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

Re: Lintalist 1.7 Searchable interactive lists to copy & paste text with plugins

31 Mar 2016, 13:34

multiple cursors is originally a feature from Sublime Text editor

Vim users have created a plugin to accomplish it in Vim:
https://github.com/terryma/vim-multiple-cursors

list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: Lintalist 1.7 Searchable interactive lists to copy & paste text with plugins

31 Mar 2016, 14:46

Thanks guest3456. Do you happen to know if snippets https://github.com/honza/vim-snippets support multiple carets as well? Or is it actually that particular plugin that you need. I can see the silent tab stops place holders ${1} etc in the snippet examples.

What I'm looking into is having AutoHotkey update the contents of a fixed snippet of an editor and call that snippet. Notepad++ and UltraEdit allow this it seems, other editors I've tried EverEdit and SublimeText only work after you restart the program (to load the updated snippet). Perhaps an plugin or API or sendmessage exist but I have only scratched the surface. Will be fun to try :-)

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: sanmaodo and 104 guests