Monday, November 30, 2020

Re: python syntax highlighting

On Mo, 30 Nov 2020, Mathieu Roux wrote:

> OK you're right, the problem was syntastic.
>
> I can disable with
>
> :SyntasticToggleMode
>
>
> What can i type in .vimrc to disable syntastic automatically?

Put

let g:loaded_syntastic_plugin = 1

into your .vimrc

Or, disable this system plugin, by using Debians vim-addon-manager

~$ vim-addon-manager disable syntastic

or uninstall the plugin:

~$ sudo apt remove vim-syntastic


Best,
Christian
--
Was ist das Allgemeine?
Der einzelne Fall.
Was ist das Besondere?
Millionen Fälle.
-- Goethe, Maximen und Reflektionen, Nr. 875

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201201072800.GA22416%40256bit.org.

Re: Markdown with LSD-hallucinations... :)

[after starting a thread concerning seeing strange colors for markdown
files] On 11/30/2020 8:29 PM, tuxic@posteo.de wrote:
>
> On 11/30 08:05, BPJ wrote:
>>
>> :setl syntax=
>>
>> maybe? :-)
>>
> ..turns any syntax element red...
>

1) What does ":echo colors_name" report?
2) What happens with ":set ft="?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/27d60908-eb89-3dd9-bcd7-d1581c03df5e%40yahoo.com.

Re: Markdown with LSD-hallucinations... :)

Hi,

...turns any syntax element red...

:|



On 11/30 08:05, BPJ wrote:
> Den mån 30 nov. 2020 19:43 <tuxic@posteo.de> skrev:
>
> > Hi,
> >
> > I often come across markdown files - mostly wth github repos.
> > When browsing those with vim I often feel like I had licked
> > a "ticket" with LSD:
> > LOTS of bright colors and marks, which do highlight that
> > much, that a deep shadow falls onto any information, that
> > may be there before... ;) :)
> >
> > Is there any recommended addon or syntax file or anything else,
> > which make browsing markdown files legal again according the
> > drug regulation laws? ;) :)
> >
>
> :setl syntax=
>
> maybe? :-)
>
>
>
> > Cheers!
> > Meino
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CADAJKhCy9_H-W2eDzLL4H0BvcmLYTGwMm0KrgNXrz5hhtNh%3DnQ%40mail.gmail.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201201042959.6ggtnpagyvkxywdp%40solfire.

Re: Markdown with LSD-hallucinations... :)


Den mån 30 nov. 2020 19:43 <tuxic@posteo.de> skrev:
Hi,

I often come across markdown files - mostly wth github repos.
When browsing those with vim I often feel like I had licked
a "ticket" with LSD:
LOTS of bright colors and marks, which do highlight that
much, that a deep shadow falls onto any information, that
may be there before... ;) :)

Is there any recommended addon or syntax file or anything else,
which make browsing markdown files legal again according the
drug regulation laws? ;) :)

:setl syntax=

 maybe? :-)



Cheers!
Meino


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201130184211.y7jogwnrz6wp6ebb%40solfire.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CADAJKhCy9_H-W2eDzLL4H0BvcmLYTGwMm0KrgNXrz5hhtNh%3DnQ%40mail.gmail.com.

Markdown with LSD-hallucinations... :)

Hi,

I often come across markdown files - mostly wth github repos.
When browsing those with vim I often feel like I had licked
a "ticket" with LSD:
LOTS of bright colors and marks, which do highlight that
much, that a deep shadow falls onto any information, that
may be there before... ;) :)

Is there any recommended addon or syntax file or anything else,
which make browsing markdown files legal again according the
drug regulation laws? ;) :)

Cheers!
Meino


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201130184211.y7jogwnrz6wp6ebb%40solfire.

Re: python syntax highlighting

I have so less time... so many things to do...

Syntastic reproach me when i write
L = [ 1,2,3 ] in python
instead of
L=[1,2,3]



On lun., 2020-11-30 at 09:46 -0800, rwmit...@gmail.com wrote:
> If you're not going to use Syntastic, why not un-install it?
>
> Have you considered learning what Synstatic is trying to show you,
> could make you a better programmer.
>
> On Monday, November 30, 2020 at 10:55:27 AM UTC-5 mth...@gmail.com
> wrote:
> > Hello,
> >
> > OK you're right, the problem was syntastic.
> >
> > I can disable with
> >
> > :SyntasticToggleMode
> >
> >
> > What can i type in .vimrc to disable syntastic automatically?
> >
> > Thanks,
> > Mathieu
> >
> >
> >
> > On sam., 2020-11-14 at 12:08 +0100, Christian Brabandt wrote:
> > > On Fr, 13 Nov 2020, Mathieu Roux wrote:
> > >
> > > > Hello,
> > > >
> > > > In fact, i have just installed all my stuff on a new computer.
> > > >
> > > > I did not installed consciently syntastic or vim-airline, but
> > maybe
> > > > i
> > > > use it and i don't know.
> > > >
> > > > Bellow is my :scriptnames.
> > >
> > > Well, according to your :scriptnames output, you have installed
> > it
> > > as
> > > your distros package.
> > >
> > > > 21: /var/lib/vim/addons/plugin/airline.vim
> > >
> > > Here is airline.
> > >
> > > > 34: /var/lib/vim/addons/plugin/syntastic/autoloclist.vim
> > >
> > > Here is syntastic
> > >
> > > I suggest, either getting yourself familiarize with the plugins
> > (by
> > > reading the documentation) or disabling those plugins or
> > > uninstalling
> > > those packages.
> > >
> > >
> > > Best,
> > > Christian
> > > --
> > > Man sollte wirklich nur die zusammen leben lassen, die ohne
> > einander
> > > sterben würden.
> > > -- Ludwig Anzengruber
> > >
> > > --
> >
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google
> Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vim_use/db5280b7-7384-4ef7-b316-d203de61dc84n%40googlegroups.com
> .

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/32caa1b868a01cb1e5b7c7104ea5a3cca2b65141.camel%40gmail.com.

Re: python syntax highlighting

If you're not going to use Syntastic, why not un-install it?

Have you considered learning what Synstatic is trying to show you, could make you a better programmer.

On Monday, November 30, 2020 at 10:55:27 AM UTC-5 mth...@gmail.com wrote:
Hello,

OK you're right, the problem was syntastic.

I can disable with

:SyntasticToggleMode


What can i type in .vimrc to disable syntastic automatically?

Thanks,
Mathieu



On sam., 2020-11-14 at 12:08 +0100, Christian Brabandt wrote:
> On Fr, 13 Nov 2020, Mathieu Roux wrote:
>
> > Hello,
> >
> > In fact, i have just installed all my stuff on a new computer.
> >
> > I did not installed consciently syntastic or vim-airline, but maybe
> > i
> > use it and i don't know.
> >
> > Bellow is my :scriptnames.
>
> Well, according to your :scriptnames output, you have installed it
> as
> your distros package.
>
> > 21: /var/lib/vim/addons/plugin/airline.vim
>
> Here is airline.
>
> > 34: /var/lib/vim/addons/plugin/syntastic/autoloclist.vim
>
> Here is syntastic
>
> I suggest, either getting yourself familiarize with the plugins (by
> reading the documentation) or disabling those plugins or
> uninstalling
> those packages.
>
>
> Best,
> Christian
> --
> Man sollte wirklich nur die zusammen leben lassen, die ohne einander
> sterben würden.
> -- Ludwig Anzengruber
>
> --

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/db5280b7-7384-4ef7-b316-d203de61dc84n%40googlegroups.com.

Re: python syntax highlighting

Hello,

OK you're right, the problem was syntastic.

I can disable with

:SyntasticToggleMode


What can i type in .vimrc to disable syntastic automatically?

Thanks,
Mathieu



On sam., 2020-11-14 at 12:08 +0100, Christian Brabandt wrote:
> On Fr, 13 Nov 2020, Mathieu Roux wrote:
>
> > Hello,
> >
> > In fact, i have just installed all my stuff on a new computer.
> >
> > I did not installed consciently syntastic or vim-airline, but maybe
> > i
> > use it and i don't know.
> >
> > Bellow is my :scriptnames.
>
> Well, according to your :scriptnames output, you have installed it
> as
> your distros package.
>
> > 21: /var/lib/vim/addons/plugin/airline.vim
>
> Here is airline.
>
> > 34: /var/lib/vim/addons/plugin/syntastic/autoloclist.vim
>
> Here is syntastic
>
> I suggest, either getting yourself familiarize with the plugins (by
> reading the documentation) or disabling those plugins or
> uninstalling
> those packages.
>
>
> Best,
> Christian
> --
> Man sollte wirklich nur die zusammen leben lassen, die ohne einander
> sterben würden.
> -- Ludwig Anzengruber
>
> --

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/8dd2b6474d6ce8821fab6800a5d995ba9af3089f.camel%40gmail.com.

Sunday, November 29, 2020

Re: How to combine windo/tabdo with a shortcutted command?

Hi Salman,

WHOW! Thank you ***VERY MUCH!*** :) :) :) :) :)

Will insert those in my .vimrc!

Cheers!
Meino

On 11/29 02:19, Salman Halim wrote:
> You're welcome. If you use windo and tabdo a lot, these versions might
> interest you. They work the same as the originals, but will restore your
> current window and tab after they're done. For example, if you execute
> ':windo set nu!', you'll end up in the last window you have open in the
> current tab; however, if you execute ':Windo set nu!', it will leave you in
> the same window as where you started.
>
> You can use Tabdo and Windo just like the regular versions (I never use the
> built-in versions any more, to be honest):
>
> function! TabDo( command )
> let currTab = tabpagenr()
>
> execute 'tabdo ' . a:command
>
> silent! execute currTab . 'tabnext'
> endfunction
> com! -nargs=+ -complete=command Tabdo call TabDo( <q-args> )
>
> " Just like Tabdo except that it disables all autocommands for super fast
> processing.
> function! TabDoFast( command )
> noautocmd call TabDo( a:command )
> endfunction
> com! -nargs=+ -complete=command Tabdofast noautocmd call TabDo(<q-args>)
>
> function! WinDo(command)
> let currwin=winnr()
>
> execute 'windo ' . a:command
>
> silent! execute currwin . 'wincmd w'
> endfunction
> com! -nargs=+ -complete=command Windo call WinDo(<q-args>)
>
> " Just like Windo except that it disables all autocommands for super fast
> processing.
> function! WinDoFast( command )
> noautocmd call WinDo( a:command )
> endfunction
> com! -nargs=+ -complete=command Windofast noautocmd call WinDo(<q-args>)
>
> On Sun, Nov 29, 2020 at 1:19 PM <tuxic@posteo.de> wrote:
>
> > Hi Salman,
> >
> > OH YES! :) Exactly what I have searched for! Thanks a lot!
> >
> > Cheers!
> > Meino
> >
> >
> >
> > On 11/29 01:15, Salman Halim wrote:
> > > If you're duplicating keystrokes you might hit in normal mode, the
> > command
> > > is :normal, so something like might work:
> > >
> > > tabdo windo normal dd
> > > tabdo windo normal Ihello<esc>
> > >
> > > --
> > >
> > > Salman
> > >
> > > On Sun, Nov 29, 2020, 13:10 <tuxic@posteo.de> wrote:
> > >
> > > > Hi Tim,
> > > >
> > > > thanks for your reply!
> > > >
> > > > Is there a more general way to acchieve this?
> > > >
> > > > If I would had asked:
> > > > "I have a command, which is known by its shortcut only: How can I
> > > > execute this command for each tab or each window by using tabdo or
> > > > window respectively?"
> > > >
> > > > Is there an answer even if the command itsself is not know first hand?
> > > >
> > > > Cheers!
> > > > Meino
> > > >
> > > >
> > > >
> > > > On 11/27 09:59, Tim Chase wrote:
> > > > > On 2020-11-27 07:44, tuxic@posteo.de wrote:
> > > > > > suppose I want to delete a line in each window or tab I currently
> > > > > > have in my vim...how can I do a
> > > > > >
> > > > > > windo
> > > > > > or
> > > > > >
> > > > > > tabdo
> > > > > >
> > > > > > combined with 'dd' (and I am too lazy to lookup the command name
> > > > > > in the help for each shortcut I want to use this way... ;)
> > > > >
> > > > > Well for the "dd" case, that's the same as the ex ":d" command so you
> > > > > can do
> > > > >
> > > > > :windo d
> > > > > :tabdo d
> > > > >
> > > > > assuming that the cursor is positioned on the right line. If it's a
> > > > > particular line like the first or last line in the file, you can
> > > > > specify that:
> > > > >
> > > > > :windo 1d
> > > > > :windo $d
> > > > >
> > > > > or if it's all lines matching a pattern,
> > > > >
> > > > > :windo g/pattern/d
> > > > >
> > > > > -tim
> > > > >
> > > > >
> > > > > --
> > > > > --
> > > > > You received this message from the "vim_use" maillist.
> > > > > Do not top-post! Type your reply below the text you are replying to.
> > > > > For more information, visit http://www.vim.org/maillist.php
> > > > >
> > > > > ---
> > > > > You received this message because you are subscribed to the Google
> > > > Groups "vim_use" group.
> > > > > To unsubscribe from this group and stop receiving emails from it,
> > send
> > > > an email to vim_use+unsubscribe@googlegroups.com.
> > > > > To view this discussion on the web visit
> > > >
> > https://groups.google.com/d/msgid/vim_use/20201127095949.1f6b9036%40bigbox.attlocal.net
> > > > .
> > > > >
> > > >
> > > > --
> > > > --
> > > > You received this message from the "vim_use" maillist.
> > > > Do not top-post! Type your reply below the text you are replying to.
> > > > For more information, visit http://www.vim.org/maillist.php
> > > >
> > > > ---
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "vim_use" group.
> > > > To unsubscribe from this group and stop receiving emails from it, send
> > an
> > > > email to vim_use+unsubscribe@googlegroups.com.
> > > > To view this discussion on the web visit
> > > >
> > https://groups.google.com/d/msgid/vim_use/20201129181017.huebjeeyumb7crfq%40solfire
> > > > .
> > > >
> > >
> > > --
> > > --
> > > You received this message from the "vim_use" maillist.
> > > Do not top-post! Type your reply below the text you are replying to.
> > > For more information, visit http://www.vim.org/maillist.php
> > >
> > > ---
> > > You received this message because you are subscribed to the Google
> > Groups "vim_use" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> > an email to vim_use+unsubscribe@googlegroups.com.
> > > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/vim_use/CANuxnEd7zKr0-k3PJ9hN9ftnvXC%3D11ug7M0ocZTOWv56YH6vYA%40mail.gmail.com
> > .
> >
> > --
> > --
> > You received this message from the "vim_use" maillist.
> > Do not top-post! Type your reply below the text you are replying to.
> > For more information, visit http://www.vim.org/maillist.php
> >
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "vim_use" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to vim_use+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/vim_use/20201129181918.k56bsfr6xhpyyg6u%40solfire
> > .
> >
>
>
> --
>
> Salman
>
> I, too, shall something make and glory in the making.
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEfw0HTjiOjycNt%2BeHDUuTXagg78iMu8vpS6-ExPaqRk4g%40mail.gmail.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201130045716.nvr4sgi2bzmgeata%40solfire.

Re: How to combine windo/tabdo with a shortcutted command?

You're welcome. If you use windo and tabdo a lot, these versions might interest you. They work the same as the originals, but will restore your current window and tab after they're done. For example, if you execute ':windo set nu!', you'll end up in the last window you have open in the current tab; however, if you execute ':Windo set nu!', it will leave you in the same window as where you started.

You can use Tabdo and Windo just like the regular versions (I never use the built-in versions any more, to be honest):

function! TabDo( command )
  let currTab = tabpagenr()

  execute 'tabdo ' . a:command

  silent! execute currTab . 'tabnext'
endfunction
com! -nargs=+ -complete=command Tabdo call TabDo( <q-args> )

" Just like Tabdo except that it disables all autocommands for super fast processing.
function! TabDoFast( command )
  noautocmd call TabDo( a:command )
endfunction
com! -nargs=+ -complete=command Tabdofast noautocmd call TabDo(<q-args>)

function! WinDo(command)
  let currwin=winnr()

  execute 'windo ' . a:command

  silent! execute currwin . 'wincmd w'
endfunction
com! -nargs=+ -complete=command Windo call WinDo(<q-args>)

" Just like Windo except that it disables all autocommands for super fast processing.
function! WinDoFast( command )
  noautocmd call WinDo( a:command )
endfunction
com! -nargs=+ -complete=command Windofast noautocmd call WinDo(<q-args>)

On Sun, Nov 29, 2020 at 1:19 PM <tuxic@posteo.de> wrote:
Hi Salman,

OH YES! :)  Exactly what I have searched for! Thanks a lot!

Cheers!
Meino



On 11/29 01:15, Salman Halim wrote:
> If you're duplicating keystrokes you might hit in normal mode, the command
> is :normal, so something like might work:
>
> tabdo windo normal dd
> tabdo windo normal Ihello<esc>
>
> --
>
> Salman
>
> On Sun, Nov 29, 2020, 13:10 <tuxic@posteo.de> wrote:
>
> > Hi Tim,
> >
> > thanks for your reply!
> >
> > Is there a more general way to acchieve this?
> >
> > If I would had asked:
> > "I have a command, which is known by its shortcut only: How can I
> > execute this command for each tab or each window by using tabdo or
> > window respectively?"
> >
> > Is there an answer even if the command itsself is not know first hand?
> >
> > Cheers!
> > Meino
> >
> >
> >
> > On 11/27 09:59, Tim Chase wrote:
> > > On 2020-11-27 07:44, tuxic@posteo.de wrote:
> > > > suppose I want to delete a line in each window or tab I currently
> > > > have in my vim...how can I do a
> > > >
> > > >     windo
> > > > or
> > > >
> > > >     tabdo
> > > >
> > > > combined with 'dd' (and I am too lazy to lookup the command name
> > > > in the help for each shortcut I want to use this way... ;)
> > >
> > > Well for the "dd" case, that's the same as the ex ":d" command so you
> > > can do
> > >
> > >   :windo d
> > >   :tabdo d
> > >
> > > assuming that the cursor is positioned on the right line.  If it's a
> > > particular line like the first or last line in the file, you can
> > > specify that:
> > >
> > >   :windo 1d
> > >   :windo $d
> > >
> > > or if it's all lines matching a pattern,
> > >
> > >   :windo g/pattern/d
> > >
> > > -tim
> > >
> > >
> > > --
> > > --
> > > You received this message from the "vim_use" maillist.
> > > Do not top-post! Type your reply below the text you are replying to.
> > > For more information, visit http://www.vim.org/maillist.php
> > >
> > > ---
> > > You received this message because you are subscribed to the Google
> > Groups "vim_use" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> > an email to vim_use+unsubscribe@googlegroups.com.
> > > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/vim_use/20201127095949.1f6b9036%40bigbox.attlocal.net
> > .
> > >
> >
> > --
> > --
> > You received this message from the "vim_use" maillist.
> > Do not top-post! Type your reply below the text you are replying to.
> > For more information, visit http://www.vim.org/maillist.php
> >
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "vim_use" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to vim_use+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/vim_use/20201129181017.huebjeeyumb7crfq%40solfire
> > .
> >
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEd7zKr0-k3PJ9hN9ftnvXC%3D11ug7M0ocZTOWv56YH6vYA%40mail.gmail.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201129181918.k56bsfr6xhpyyg6u%40solfire.


--
 
Salman

I, too, shall something make and glory in the making.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEfw0HTjiOjycNt%2BeHDUuTXagg78iMu8vpS6-ExPaqRk4g%40mail.gmail.com.

Re: How to combine windo/tabdo with a shortcutted command?

Hi Salman,

OH YES! :) Exactly what I have searched for! Thanks a lot!

Cheers!
Meino



On 11/29 01:15, Salman Halim wrote:
> If you're duplicating keystrokes you might hit in normal mode, the command
> is :normal, so something like might work:
>
> tabdo windo normal dd
> tabdo windo normal Ihello<esc>
>
> --
>
> Salman
>
> On Sun, Nov 29, 2020, 13:10 <tuxic@posteo.de> wrote:
>
> > Hi Tim,
> >
> > thanks for your reply!
> >
> > Is there a more general way to acchieve this?
> >
> > If I would had asked:
> > "I have a command, which is known by its shortcut only: How can I
> > execute this command for each tab or each window by using tabdo or
> > window respectively?"
> >
> > Is there an answer even if the command itsself is not know first hand?
> >
> > Cheers!
> > Meino
> >
> >
> >
> > On 11/27 09:59, Tim Chase wrote:
> > > On 2020-11-27 07:44, tuxic@posteo.de wrote:
> > > > suppose I want to delete a line in each window or tab I currently
> > > > have in my vim...how can I do a
> > > >
> > > > windo
> > > > or
> > > >
> > > > tabdo
> > > >
> > > > combined with 'dd' (and I am too lazy to lookup the command name
> > > > in the help for each shortcut I want to use this way... ;)
> > >
> > > Well for the "dd" case, that's the same as the ex ":d" command so you
> > > can do
> > >
> > > :windo d
> > > :tabdo d
> > >
> > > assuming that the cursor is positioned on the right line. If it's a
> > > particular line like the first or last line in the file, you can
> > > specify that:
> > >
> > > :windo 1d
> > > :windo $d
> > >
> > > or if it's all lines matching a pattern,
> > >
> > > :windo g/pattern/d
> > >
> > > -tim
> > >
> > >
> > > --
> > > --
> > > You received this message from the "vim_use" maillist.
> > > Do not top-post! Type your reply below the text you are replying to.
> > > For more information, visit http://www.vim.org/maillist.php
> > >
> > > ---
> > > You received this message because you are subscribed to the Google
> > Groups "vim_use" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> > an email to vim_use+unsubscribe@googlegroups.com.
> > > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/vim_use/20201127095949.1f6b9036%40bigbox.attlocal.net
> > .
> > >
> >
> > --
> > --
> > You received this message from the "vim_use" maillist.
> > Do not top-post! Type your reply below the text you are replying to.
> > For more information, visit http://www.vim.org/maillist.php
> >
> > ---
> > You received this message because you are subscribed to the Google Groups
> > "vim_use" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to vim_use+unsubscribe@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/vim_use/20201129181017.huebjeeyumb7crfq%40solfire
> > .
> >
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEd7zKr0-k3PJ9hN9ftnvXC%3D11ug7M0ocZTOWv56YH6vYA%40mail.gmail.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201129181918.k56bsfr6xhpyyg6u%40solfire.

Re: How to combine windo/tabdo with a shortcutted command?

If you're duplicating keystrokes you might hit in normal mode, the command is :normal, so something like might work:

tabdo windo normal dd
tabdo windo normal Ihello<esc>

--

Salman

On Sun, Nov 29, 2020, 13:10 <tuxic@posteo.de> wrote:
Hi Tim,

thanks for your reply!

Is there a more general way to acchieve this?

If I would had asked:
"I have a command, which is known by its shortcut only: How can I
execute this command for each tab or each window by using tabdo or
window respectively?"

Is there an answer even if the command itsself is not know first hand?

Cheers!
Meino



On 11/27 09:59, Tim Chase wrote:
> On 2020-11-27 07:44, tuxic@posteo.de wrote:
> > suppose I want to delete a line in each window or tab I currently
> > have in my vim...how can I do a
> >
> >     windo
> > or
> >
> >     tabdo
> >
> > combined with 'dd' (and I am too lazy to lookup the command name
> > in the help for each shortcut I want to use this way... ;)
>
> Well for the "dd" case, that's the same as the ex ":d" command so you
> can do
>
>   :windo d
>   :tabdo d
>
> assuming that the cursor is positioned on the right line.  If it's a
> particular line like the first or last line in the file, you can
> specify that:
>
>   :windo 1d
>   :windo $d
>
> or if it's all lines matching a pattern,
>
>   :windo g/pattern/d
>
> -tim
>
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201127095949.1f6b9036%40bigbox.attlocal.net.
>

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201129181017.huebjeeyumb7crfq%40solfire.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEd7zKr0-k3PJ9hN9ftnvXC%3D11ug7M0ocZTOWv56YH6vYA%40mail.gmail.com.

Re: How to combine windo/tabdo with a shortcutted command?

Hi Tim,

thanks for your reply!

Is there a more general way to acchieve this?

If I would had asked:
"I have a command, which is known by its shortcut only: How can I
execute this command for each tab or each window by using tabdo or
window respectively?"

Is there an answer even if the command itsself is not know first hand?

Cheers!
Meino



On 11/27 09:59, Tim Chase wrote:
> On 2020-11-27 07:44, tuxic@posteo.de wrote:
> > suppose I want to delete a line in each window or tab I currently
> > have in my vim...how can I do a
> >
> > windo
> > or
> >
> > tabdo
> >
> > combined with 'dd' (and I am too lazy to lookup the command name
> > in the help for each shortcut I want to use this way... ;)
>
> Well for the "dd" case, that's the same as the ex ":d" command so you
> can do
>
> :windo d
> :tabdo d
>
> assuming that the cursor is positioned on the right line. If it's a
> particular line like the first or last line in the file, you can
> specify that:
>
> :windo 1d
> :windo $d
>
> or if it's all lines matching a pattern,
>
> :windo g/pattern/d
>
> -tim
>
>
> --
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups "vim_use" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201127095949.1f6b9036%40bigbox.attlocal.net.
>

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201129181017.huebjeeyumb7crfq%40solfire.

Friday, November 27, 2020

Re: help with map(), please!

Salman Halim wrote:
> Dr. Chip,
>
> I may be trivializing what's happening, but have you considered using
> \_s instead of just \s?
>
> Or passing it to another map that calls trim before?
>
> Something like split -> mapWithTrim -> yourOriginalMap
>
> I'm sure I'm missing something obvious because someone with your
> experience wouldn't ask a question if it were this simple. Also, I'm
> using my mobile phone right now so I can't actually type the full syntax.
>
> I would've used a join instead of the last map and just wrap the
> result in a <> pair.
Actually, a join is in use .. but it needed several processing steps.
Thank you! I don't think I've ever used (or noticed) trim() before.
Still plenty to learn, and trim did the trick. Still, I think an example
using substitute with map would be a Good Idea. I did finally get it to
work, but then your note about trim() appeared, and I switched to using
that.

Regards,
Chip Campbell

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/67a72d06-cc3a-9069-a928-0daf32cfa247%40drchip.org.

Re: help with map(), please!

Dr. Chip,

I may be trivializing what's happening, but have you considered using \_s instead of just \s?

Or passing it to another map that calls trim before?

Something like split -> mapWithTrim -> yourOriginalMap

I'm sure I'm missing something obvious because someone with your experience wouldn't ask a question if it were this simple. Also, I'm using my mobile phone right now so I can't actually type the full syntax.

I would've used a join instead of the last map and just wrap the result in a <> pair. 

--

Salman

On Fri, Nov 27, 2020, 19:05 Charles Campbell <campbell@drchip.org> wrote:
I'm having a bit of a problem with map(). I've had problems with map() before, and consequently I really really hate to use it.
Here goes:

1: construct a comment:
"   Testing: one two | three four | five | six |
"            seven | eight |;
2. grab characters:
fo<ctrl-v>j$"ay

3. convert to list:
let list= split(@a,'\s*|\s*;\=',' ')
4. Now, try to use map():
call map(list,"substitute(v:val,'<&>','','ge')")

Intent: to put <...> around every argument. Now, this isn't really my final intent for this, but if I could get that substitute to work, it'd be a nice start. Please note, the request is on how to get a substitute() to work with map(), not to put angle brackets around every list element, for which :help map() already has an example.
5. Bonus request: my construction above carefully gets a newline into the list. Using :echo string(list):
['one two', 'three four', 'five', 'six', '
seven', 'eight', '                    ']
    I cannot seem to get rid of the newline, but its probably due to my lack of success with substitute().

I've spent about three hours on this so far, with multiple attempts, all unsuccessful. Perhaps an extra example in help map() illustrating how to do this would be of use?

Thank you,
Chip Campbell

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/91e26ba3-9e1b-19ad-3c43-ff7b42a0de3c%40drchip.org.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CANuxnEfkwDiTgaC9e2zDNCo6-nhch4N3A9B59EV6JbAdws1U8A%40mail.gmail.com.

help with map(), please!

I'm having a bit of a problem with map(). I've had problems with map() before, and consequently I really really hate to use it.
Here goes:

1: construct a comment:
"   Testing: one two | three four | five | six |
"            seven | eight |;
2. grab characters:
fo<ctrl-v>j$"ay

3. convert to list:
let list= split(@a,'\s*|\s*;\=',' ')
4. Now, try to use map():
call map(list,"substitute(v:val,'<&>','','ge')")

Intent: to put <...> around every argument. Now, this isn't really my final intent for this, but if I could get that substitute to work, it'd be a nice start. Please note, the request is on how to get a substitute() to work with map(), not to put angle brackets around every list element, for which :help map() already has an example.
5. Bonus request: my construction above carefully gets a newline into the list. Using :echo string(list):
['one two', 'three four', 'five', 'six', '
seven', 'eight', '                    ']
    I cannot seem to get rid of the newline, but its probably due to my lack of success with substitute().

I've spent about three hours on this so far, with multiple attempts, all unsuccessful. Perhaps an extra example in help map() illustrating how to do this would be of use?

Thank you,
Chip Campbell

Re: How to combine windo/tabdo with a shortcutted command?

On 2020-11-27 07:44, tuxic@posteo.de wrote:
> suppose I want to delete a line in each window or tab I currently
> have in my vim...how can I do a
>
> windo
> or
>
> tabdo
>
> combined with 'dd' (and I am too lazy to lookup the command name
> in the help for each shortcut I want to use this way... ;)

Well for the "dd" case, that's the same as the ex ":d" command so you
can do

:windo d
:tabdo d

assuming that the cursor is positioned on the right line. If it's a
particular line like the first or last line in the file, you can
specify that:

:windo 1d
:windo $d

or if it's all lines matching a pattern,

:windo g/pattern/d

-tim


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201127095949.1f6b9036%40bigbox.attlocal.net.

Thursday, November 26, 2020

How to combine windo/tabdo with a shortcutted command?

Hi,

suppose I want to delete a line in each window or tab I currently
have in my vim...how can I do a

windo
or

tabdo

combined with 'dd' (and I am too lazy to lookup the command name
in the help for each shortcut I want to use this way... ;)

Is there a common way to this?

Cheers!
mcc




--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201127064459.3g2nnufveofkpl53%40solfire.

Tuesday, November 24, 2020

Re: best library for data forms entry in vim


Look -  if it comes up repeatedly in conversations, then hey, you know there just MIGHT be something there?

I'd argue it this way - the goal of an editor is to be able for users to edit documents, right? That's the verbatim definition of an editor. 

Now, there is a large class of documents that vim is NOT suited for - and that is structured documents, consisting of data fields. And unfortunately for vim, that is a huge portion of the data-entering world, and is getting larger by the day. And there is no good unix program for handling it.

So you have a large, unfilled use case here - where your goal is to not worry about the formatting, the editing, the keybindings - or anything associated with an editor - and where you want to only worry about the data and can manipulate that data via callbacks.

And yes, you are right, since vim didn't have something like this I ended up writing a custom solution. It sucks. I wrote it in 1500 lines of python using asciimatics when I could have done it within say 50 lines of python with a decent templating system and vim. Again, it royally sucks. 

I took about 3 days to write it when it could have taken - again - about 1 hour or so with a decent templating system. And more to the point it looks less professional than it would have in vim. It doesn't leverage the large code base and I have to train people to use the arbitrary keybindings.

So yeah,  I definitely say that there is a use case for it here and if there are multiple conversations about it that come up from time to time I'd say that this just makes my point for me.

Ed


On Thursday, November 19, 2020 at 7:20:46 PM UTC-6 rwmit...@gmail.com wrote:
This discussion comes up repeatedly (so shows using the conversation search in google groups).

One suggestion was to use a split panel.  One panel would have user entered keywords and the other the combined document.  When saving the keywords, a script would auto run to do the substitutions and then load the results into the other panel. (well, that is how i interpreted the suggestion)

If your goal is to have them edit a document every 20 seconds, I really can't imagine they'll be doing a lot of editing other than filling in the required fields.

If you plan on having multiple templates, the problem gets more involved and so does the glue code to do the magic of manipulating fields to compute new fields/values.

Back in '88 I worked for a company that used something called Dataflex to generate input forms for phone support to use when responding to customers.  Ultimately you're probably looking at a custom solution.  It is amazing how something can look simple on the outset but quickly becomes much more involved.


On Thursday, November 19, 2020 at 5:53:41 PM UTC-5 ruben...@my.liu.edu wrote:
On 11/19/20 1:08 PM, hor...@gmail.com wrote:
> You know, the more I'm thinking about it, the more I think vim needs an
> internal templating system. 

no it doesn't, so don't thnink about it so much.

vim is fine, if not already over built a little.


--
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/0da9febc-3d40-4ed0-8623-5e87761bd149n%40googlegroups.com.

Sunday, November 22, 2020

Re: Vim9 part of list broken ?

> This notation in vim9 seems to not work yet.
>
> readfile(file)[ 0, 2 ]

Did you mean:
readfile(file)[ 0: 2 ]

That appears to work

--
I'd like to meet the man who invented sex and see what he's working on now.

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/202011221324.0AMDOVAw1209216%40masaka.moolenaar.net.

Saturday, November 21, 2020

Vim9 part of list broken ?

Hi,

This notation in vim9 seems to not work yet.

readfile(file)[ 0, 2 ]

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/369f1581-8206-439d-a59f-8d1097657264n%40googlegroups.com.

Re: [EXTERNAL] Re: .swp files

чт, 5 нояб. 2020 г. в 23:23, Ruben Safir <ruben.safir@my.liu.edu>:
>
> Let the user filing this crazy complaint use openoffice (or learn good habits).

About 10 or 15 year ago, I used an openoffice spreadsheet to keep some
of my data.
Then I suddenly lost all the data in that spreadsheet file just
because openoffice was
too slow to save it correctly during an unexpected blackout.

Since then I have no openoffice on my computer, always use text files to save
my data and edit them with just a plain text editor. For the last 7
years it has been Gvim.

Even if a sudden blackout happens, Gvim somehow manages to save all
the changes I recently made to my text files and recover them afterwards.

To make it more resilient, I have recently bought UPS. So, now I have
at least 3 minutes to manually save all my work during a sudden blackout.

Just my 5 cents. :)

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CA%2Bt6X7dEtvKfvYH-1HyBtQqakeFY2P9-WCFs4uoESEjGi1nkEQ%40mail.gmail.com.

Thursday, November 19, 2020

Re: best library for data forms entry in vim

This discussion comes up repeatedly (so shows using the conversation search in google groups).

One suggestion was to use a split panel.  One panel would have user entered keywords and the other the combined document.  When saving the keywords, a script would auto run to do the substitutions and then load the results into the other panel. (well, that is how i interpreted the suggestion)

If your goal is to have them edit a document every 20 seconds, I really can't imagine they'll be doing a lot of editing other than filling in the required fields.

If you plan on having multiple templates, the problem gets more involved and so does the glue code to do the magic of manipulating fields to compute new fields/values.

Back in '88 I worked for a company that used something called Dataflex to generate input forms for phone support to use when responding to customers.  Ultimately you're probably looking at a custom solution.  It is amazing how something can look simple on the outset but quickly becomes much more involved.


On Thursday, November 19, 2020 at 5:53:41 PM UTC-5 ruben...@my.liu.edu wrote:
On 11/19/20 1:08 PM, hor...@gmail.com wrote:
> You know, the more I'm thinking about it, the more I think vim needs an
> internal templating system. 

no it doesn't, so don't thnink about it so much.

vim is fine, if not already over built a little.


--
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/51b96b05-f137-4579-bf1c-43311a62c794n%40googlegroups.com.

Re: best library for data forms entry in vim

On 11/19/20 1:08 PM, hor...@gmail.com wrote:
> You know, the more I'm thinking about it, the more I think vim needs an
> internal templating system. 

no it doesn't, so don't thnink about it so much.

vim is fine, if not already over built a little.


--
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/00c1c163-a617-22de-9ad6-8317d1834086%40my.liu.edu.

Re: best library for data forms entry in vim

You know, the more I'm thinking about it, the more I think vim needs an internal templating system. 

As it stands, I get how this is done in vim now - you use vimscript to create the template for you, in other words you need to program the look and feel. It has a lot in common with approaches like asciimatics in python (https://github.com/peterbrittain/asciimatics). 

This is IMO a lot more difficult than it need be. For example, leandro posted a todo application for me to see how its done (https://github.com/freitass/todo.txt-vim) and I looked at it - about 250 lines of vimscript code to get the formatting where you can enter in todo lines. I'd rather have vim itself do the formatting for me, and just worry about the actual logic behind it. So that app would become

todo.tmpl

----
Todo
----
Done                                                                    Name                                                                                       Status
[[ {{ type=box, name=_donebox align=left }} {{ type=string[35], name = _task, align=left, color=red }} {{type=string[35], name=_status, align=left }} ]]



where you could define the elements you want in your application inline and attach pieces of code to them to do any variable manipulation. Arrays of lines could be designated by  [[.   ]],  Any user input could directly map onto python or perl in the form of python/perl arrays, or perhaps arrays of hashes - and each element would have its own coderef associated with it if you needed to process the output in any way.

I've mocked this up by making vim separately called from perl, memoizing all the variables that are defined in the template, and then responding to user input by hack - the user needs to close the actual vim session in order for perl to actually do the recalculation and realignment. This works (after a fashion) but it really is a hack and wouldn't be usable for what i want to do. But i'm hoping that perhaps a templating system could make its way into a newer version of vim.

On Thursday, November 19, 2020 at 3:30:17 AM UTC-6 Shlomi Fish wrote:
Hi Gabriele,

On Wed, 18 Nov 2020 09:36:30 +0100
Gabriele <gb...@tiscali.it> wrote:

> On 18/11/2020 9.14, Shlomi Fish wrote:
> > I can recommend *against* using m4, which although part of the POSIX
> > standard, is limited and vile in both syntax and behaviour. I have a page
> > on my site with a roundup of similar text-processing tools and links
> > including preprocessors, and template systems:
> >
> > https://www.shlomifish.org/open-source/resources/text-processing-tools/
>
> Well as we're at it I can strongly recommend against GPP, which I see
> listed first on that page.
>
> I haven't had experience with the linked logological.org version though,
> it's not entirely impossible that they improved it a lot.
>

Thanks for the information. I should also note that the distinction between
template systems and preprocessors is often blurred, similarly to the
distinction between text editors and IDEs. I used to list m4 first in that
section, but someone thought I somehow recommend or endorse it due to that.

> Of course this has still nothing to do with what the thread author wanted
>

Right, I've only replied due to
https://explainxkcd.com/wiki/index.php/386:_Duty_Calls .


--

Shlomi Fish https://www.shlomifish.org/
https://youtu.be/GoEn1YfYTBM - Tiffany Alvord - "Fall Together"

Every successful open source project will eventually spawn a sub‐project.
https://www.shlomifish.org/humour/fortunes/osp_rules.html

Please reply to list if it's a mailing list post - https://shlom.in/reply .

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/153a5cd7-e7af-4547-8a97-80ea57a3a00cn%40googlegroups.com.

Re: best library for data forms entry in vim

Hi Gabriele,

On Wed, 18 Nov 2020 09:36:30 +0100
Gabriele <gbfv@tiscali.it> wrote:

> On 18/11/2020 9.14, Shlomi Fish wrote:
> > I can recommend *against* using m4, which although part of the POSIX
> > standard, is limited and vile in both syntax and behaviour. I have a page
> > on my site with a roundup of similar text-processing tools and links
> > including preprocessors, and template systems:
> >
> > https://www.shlomifish.org/open-source/resources/text-processing-tools/
>
> Well as we're at it I can strongly recommend against GPP, which I see
> listed first on that page.
>
> I haven't had experience with the linked logological.org version though,
> it's not entirely impossible that they improved it a lot.
>

Thanks for the information. I should also note that the distinction between
template systems and preprocessors is often blurred, similarly to the
distinction between text editors and IDEs. I used to list m4 first in that
section, but someone thought I somehow recommend or endorse it due to that.

> Of course this has still nothing to do with what the thread author wanted
>

Right, I've only replied due to
https://explainxkcd.com/wiki/index.php/386:_Duty_Calls .


--

Shlomi Fish https://www.shlomifish.org/
https://youtu.be/GoEn1YfYTBM - Tiffany Alvord - "Fall Together"

Every successful open source project will eventually spawn a sub‐project.
https://www.shlomifish.org/humour/fortunes/osp_rules.html

Please reply to list if it's a mailing list post - https://shlom.in/reply .

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20201119112958.0671447b%40telaviv1.shlomifish.org.

Wednesday, November 18, 2020

Re: best library for data forms entry in vim

Den ons 18 nov. 2020 22:14hor...@gmail.com <horos22@gmail.com> skrev:
BPJ,

Thanks for the feedback and idea, and i'll check out your tool.

Thanks. Note that I just pushed a rather vital fix for a bug which I introduced earlier today!

/bpj

You know, that's my fallback plan, to script it up and do substitutions based off of user input if necessary. I've done something very similar before, and its workable.

But I submit to you that being able to do it via an editor would be an order of magnitude more scalable and usable. You could put in helpful keybindings to speed up data processing, use certain keys to calculate derivative windows to help users evaluate their input, and use the editor within a script to present multiple cases to end users for them to process one after another. 

My goal was to have users take about 20 seconds per use case with the help of scripting, in-vim macros, and vim's very useful perl and python bindings. It would reduce error rates as well.

If you had a clean Implementation for this, you could make vim the center for a whole new class of applications based off of data processing.  Again, think excel for unix.

In any case, if I was going to provide low-level support for this in vim itself, I'd make it so that there was a file of type template, where:

1. the state of the default text of the file could be tagged as uneditable - ie: the vim cursor could only edit certain parts of the file based on tags given by the user. All vim keys would 'skip over these uneditable parts and go directly to the next user entry portion
2. the default state of the file would be insert mode, with helpful key macros to go to the next line.
3. The editable parts would have callbacks associated with them. Each callback could be then specified in the file in the form of a python or perl piece of code which either would set input or calculate input.

So my original example would look something like this. Each time a user would enter in value, the callbacks would be re-executed and any updates would be made to the script. If a value is undef, it would show up as a red piece of text.

I maintain that this would be very powerful. My personal application is making training cases for a nn, but I could see all sorts of applications for it.

Ed

 Dear <<<person>>>>

We received your order for <<<name>>>, price <<<price>>>, quantity <<<quantity>>>, total <<<total>>>

Please look over the above information to make sure that this is correct.

<<<email>>>
__CODE__
{
    'person' => sub { $person = $_[0] },
    'name'   => sub { $name = $_[0] },
    'price'.   => sub { $price = $_[0] },
    'quantity' => sub { $quantity = $_[0] },
    'total'.       => sub { $total = $price * $quantity }
    'email'        => sub { if  (($_[0]) && _is_email($_[0])) {  _mailit( $_[0], $text) }
}


On Wednesday, November 18, 2020 at 9:51:02 AM UTC-6 BPJ wrote:
Den tis 17 nov. 2020 23:12hor...@gmail.com <hor...@gmail.com> skrev:
I'm not sure I made myself clear -  this particular application needs to be interactive.

In other words, you enter in values in one location, it calculates derivative values in another location, and you keep working on it until you are satisfied that you are in fact done with it. That is why vim stuck out as a possible solution - it really needs an editor. All my example was meant to do was show what I had in mind.

I had the same need a couple of years ago. The script I wrote for the purpose (and just updated for publicizing) does not work from inside an editor but does interactively replace placeholders (format configurable) in a text file with prompted-for values, optionally silently inserting already "known" values on subsequent occurrences of the same placeholder. You can also optionally preload a default key-value mapping from a YAML or JSON file and/or save the collected/modified data to a YAML file.



so have people attempted this? if so which api should I be looking at..


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/c3b018f8-bd51-44a6-900f-adbc7dbd22een%40googlegroups.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/434cf3d5-2634-402a-90a8-e1c5bef04a45n%40googlegroups.com.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CADAJKhDodORhZRdiPv2dG4iDeXzHkCSrTUYMfcF6Z8EmHNg94g%40mail.gmail.com.