Sunday, September 30, 2018

Re: count folds ?

Hi,

2018-10-1(Mon) 5:10:36 UTC+9 M Kelly:
> Hi,
>
> Is there a way in vim script to count the number of folds present ?
>
> thanks always for the vim universe,
> -mark

See the following documents.

:h foldclosed()
:h foldclosedend)

---- sample start ----
func! GetFoldLines(lnum)
let fstart = foldclosed(a:lnum)
if fstart == -1
return -1
else
return foldclosedend(a:lnum) - fstart + 1
endif
endfunc

echo GetFoldLines(".")
---- sample end ----

--
Best regards,
Hirohito Higashi (h_east)

--
--
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.
For more options, visit https://groups.google.com/d/optout.

count folds ?

Hi,

Is there a way in vim script to count the number of folds present ?

thanks always for the vim universe,
-mark

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: from the old vi faq

On Sun, Sep 30, 2018 at 5:17 PM Mikolaj Machowski <mikmach@gmail.com> wrote:
>
> On Sunday, September 30, 2018 at 9:15:36 AM UTC+2, Eli the Bearded wrote:
> >
> > :v/./$s/$/<ctrl-v><enter>./|'';/./-1j|$d
> > Replaces multiple blank lines with just one blank line.
>
> What's wrong with:
>
> :%s/\n\n\+/\r\r/
>
> ?
>
> m.

or with :%s/^\_s*\n/\r

(to replace any number of consecutive lines containing only whitespace
by just one empty line) ?

Variation: the same, plus suppress end-of-line whitespace:

:%s/\_s*\n/\r

(both of these use the fact that * means "as many as possible")

Best regards,
Tony.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: from the old vi faq

Eli the Bearded wrote:

> http://www.faqs.org/faqs/editor-faq/vi/part2/
> ------ start quote 8< ------
> 6.1 - Silly vi tricks
> Note: Also check out the Silly macros down below. Many macros and
> tricks are interchangeable.
>
> xp This will delete the character under the cursor, and put it
> afterwards. In other words, it swaps the location of two characters.
>
> ddp Similar to xp, but swapping lines.
>
> yyp duplicate a line
>
> uu Undo and redo last change. (This will take you to the last
> modification to the file without changing anything.) You can also use
> this to compare the changes to a line. Make the changes to the line,
> press U to undo the changes to the current line, and then press u to
> toggle between the two versions.
>
> :g/.*/m0
> This will reverse the order of the lines in the current file.
> m0 is the ex command to move the line to line 0.
>
> :v/./d or :g/^$/d
> Removes all blank lines.
>
> :g/^[ <ctrl-v><tab>]*$/d
> Removes all lines that only have whitespace.
>
> :v/./$s/$/<ctrl-v><enter>./|'';/./-1j|$d
> Replaces multiple blank lines with just one blank line.
> ------ >8 end quote ------
>
> All of that works in vim (save "uu" with modern undo settings), except
> for the last one. I happen to have true vi handy ("Version 4.0 (gritter)
> 3/25/05"), as well as nvi ("Version (1.81.6-2013-11-20nb3)"), elvis
> ("2.2.0"), vim 7.4, and vim 8.1.
>
> The replace multiple blank lines works in true vi and nvi, but not in
> elvis or either vim. The trick works by the :v/./ selecting a group of
> lines, $s editing the last line in that group to be a blank line and a
> line with a dot, then |'' returning to the first line in the group, /./-1j
> joining all but the last line of the group (so as not to join the new
> dot line), and finally |$d deleting that last dot line. It's a
> seriously complicated "trick", with lots of subtle compatibility tests
> built right in.
>
> Is this a known incompatiblity in vim? I don't recall seeing it
> documented. And I sought out that FAQ precisely for that trick since I
> recalled it existed, but not what it was.

AFAIK this builds upon a bug in Vi. In Nvi Keith Bostic decided to keep
it like that (perhaps because of this example). I decided that it's
really an unintentional bug and did not replicate it.

Using "$" after :v does not refer to "the last in a a group", since :v
works on a per-line base, it marks every line not matching the pattern.
So in Vim the "$" refers to the last line, and changes that.

There are much simpler ways to collapse multiple blank lines.

--
hundred-and-one symptoms of being an internet addict:
122. You ask if the Netaholics Anonymous t-shirt you ordered can be
sent to you via e-mail.

/// 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.
For more options, visit https://groups.google.com/d/optout.

Re: from the old vi faq

On Sunday, September 30, 2018 at 9:15:36 AM UTC+2, Eli the Bearded wrote:
>
> :v/./$s/$/<ctrl-v><enter>./|'';/./-1j|$d
> Replaces multiple blank lines with just one blank line.

What's wrong with:

:%s/\n\n\+/\r\r/

?

m.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: from the old vi faq

On 30.09.18 03:15, Eli the Bearded wrote:
> http://www.faqs.org/faqs/editor-faq/vi/part2/
> ------ start quote 8< ------
> 6.1 - Silly vi tricks

Seems to be a typo there? For decades some have used them as _Standard_
Vi(m) Operations, especially xp, as mistyping is more common than the
need for the others.

> Note: Also check out the Silly macros down below. Many macros and
> tricks are interchangeable.
>
> xp This will delete the character under the cursor, and put it
> afterwards. In other words, it swaps the location of two characters.
>
> ddp Similar to xp, but swapping lines.
>
> yyp duplicate a line
>
> uu Undo and redo last change. (This will take you to the last
> modification to the file without changing anything.) You can also use
> this to compare the changes to a line. Make the changes to the line,
> press U to undo the changes to the current line, and then press u to
> toggle between the two versions.

Must have encountered that, way back, because my fingers use u^r these days.

What I'd group with the above is "deep", to swap two words with the
cursor on the space preceding the first. (Most used while rephrasing a
sentence in a post, I find.)

What makes a *nix environment fun is the diversity of ways to skin any
cat, and I tend to us tac to reverse line order, as it's quicker than
looking up a vim way to do it - at least in my case. (And I don't think
of vim as another emacs.)

Erik

--
--
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.
For more options, visit https://groups.google.com/d/optout.

from the old vi faq

http://www.faqs.org/faqs/editor-faq/vi/part2/
------ start quote 8< ------
6.1 - Silly vi tricks
Note: Also check out the Silly macros down below. Many macros and
tricks are interchangeable.

xp This will delete the character under the cursor, and put it
afterwards. In other words, it swaps the location of two characters.

ddp Similar to xp, but swapping lines.

yyp duplicate a line

uu Undo and redo last change. (This will take you to the last
modification to the file without changing anything.) You can also use
this to compare the changes to a line. Make the changes to the line,
press U to undo the changes to the current line, and then press u to
toggle between the two versions.

:g/.*/m0
This will reverse the order of the lines in the current file.
m0 is the ex command to move the line to line 0.

:v/./d or :g/^$/d
Removes all blank lines.

:g/^[ <ctrl-v><tab>]*$/d
Removes all lines that only have whitespace.

:v/./$s/$/<ctrl-v><enter>./|'';/./-1j|$d
Replaces multiple blank lines with just one blank line.
------ >8 end quote ------

All of that works in vim (save "uu" with modern undo settings), except
for the last one. I happen to have true vi handy ("Version 4.0 (gritter)
3/25/05"), as well as nvi ("Version (1.81.6-2013-11-20nb3)"), elvis
("2.2.0"), vim 7.4, and vim 8.1.

The replace multiple blank lines works in true vi and nvi, but not in
elvis or either vim. The trick works by the :v/./ selecting a group of
lines, $s editing the last line in that group to be a blank line and a
line with a dot, then |'' returning to the first line in the group, /./-1j
joining all but the last line of the group (so as not to join the new
dot line), and finally |$d deleting that last dot line. It's a
seriously complicated "trick", with lots of subtle compatibility tests
built right in.

Is this a known incompatiblity in vim? I don't recall seeing it
documented. And I sought out that FAQ precisely for that trick since I
recalled it existed, but not what it was.

Elijah
------
tends to use :g/^/m0 for reversing lines (even works in ed)

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Friday, September 28, 2018

Re: editing textareas in Firefox with vim

On Fri, Sep 28, 2018 at 1:34 PM Paul <vim91549@rainslide.net> wrote:
>
> On Sat, Aug 25, 2018 at 07:25:12AM -0400, Michael Henry wrote:
> >I've been using "textern" for this, though I don't use it heavily.
>
> This is great. For reference, the configuration to open Gvim with the cursor in the same position as in the browser is ["gvim", "-f", "+%l", "-c normal %c|"], or ["gvim", "-f", "-c call setpos('.',[0,%l,%c,0])"] - I'm not sure which is more efficient.
>

:-)
This looks quite a lot like a function which I defined a few weeks ago
in my vimrc, to help getting at errors pointed to by line and column
(in HTML validation in the browser, not via a quickfix error list in
Vim):

" Go to line and column
function GoTo(line, column)
exe min([line("$"), a:line]) "| normal" a:column . "|"
endfunction

Best regards,
Tony.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: editing textareas in Firefox with vim

On Sat, Aug 25, 2018 at 07:25:12AM -0400, Michael Henry wrote:
>I've been using "textern" for this, though I don't use it heavily.

This is great. For reference, the configuration to open Gvim with the cursor in the same position as in the browser is ["gvim", "-f", "+%l", "-c normal %c|"], or ["gvim", "-f", "-c call setpos('.',[0,%l,%c,0])"] - I'm not sure which is more efficient.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Thursday, September 27, 2018

Re: E121 : Undefined variable: paste#paste_cmd on Vim 8.1 1-436 second launch

Le jeudi 27 septembre 2018 12:52:21 UTC+2, Tony Mechelynck a écrit :
> It looks to me like a case of out-of-date runtime files (but I could
> be mistaken). Please check the last change dates of the following as
> displayed near the top of each file (I'm listing the dates I see
> there):
>
> $VIMRUNTIME/menu.vim 2018 May 17
> $VIMRUNTIME/autoload/paste.vim 2017 Aug 30
>
> paste#paste_cmd should be a Dictionary with keys 'n' 'v' and 'i' each
> corresponding to a String. Line 163 of menu.vim is here too the first
> line where it is referenced.
>
> Note that it is NOT recommended to source the vimrc in an already
> running instance of Vim. The recommended way to make Vim take note of
> a modified vimrc is to shut Vim down properly then restart it.
>
>
> Best regards,
> Tony.

Ok after a Check,

1/ Tony, I got the good runtime files this time. check of "paste#paste_cmd should be a Dictionary with keys 'n' 'v' and 'i' " is OK

2/ Ken, second launch is just to say that I launch Vim two times.
Effectively I don't use official installer but just put Vim main dir into %tmp% dir of local user under whatever Windows 64 32 bits, Physical or Virtual machine

I cannot detail explicitly all tasks I do out of
2.1 opening gvim, exploring dir with netrw, making current dir explored to current pwd and finding some string into files recursively with ripgrep.
2.2 Then using a own vimscript to convert encapsulated vbscript into viewable bscript, extracting feature, modifying and restoring modified vbscript, saving a file then closing gvim.

3/ Not reproduced after several tests on VM or Physical machines under Windows Seven 64 or 32.

Will consider that it was a bad copy of main dir own distribution.

Thank you, sorry for inconvenience.
NiVa

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: E121 : Undefined variable: paste#paste_cmd on Vim 8.1 1-436 second launch

It looks to me like a case of out-of-date runtime files (but I could
be mistaken). Please check the last change dates of the following as
displayed near the top of each file (I'm listing the dates I see
there):

$VIMRUNTIME/menu.vim 2018 May 17
$VIMRUNTIME/autoload/paste.vim 2017 Aug 30

paste#paste_cmd should be a Dictionary with keys 'n' 'v' and 'i' each
corresponding to a String. Line 163 of menu.vim is here too the first
line where it is referenced.

Note that it is NOT recommended to source the vimrc in an already
running instance of Vim. The recommended way to make Vim take note of
a modified vimrc is to shut Vim down properly then restart it.


Best regards,
Tony.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: E121 : Undefined variable: paste#paste_cmd on Vim 8.1 1-436 second launch

Hi Ni,

2018/9/27 Thu 18:47:04 UTC+9 Ni Va wrote:
> Hi,
>
> I use this last built version of Vim.
>
> VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 26 2018 13:46:15)
> MS-Windows 32-bit GUI version with OLE support
> Included patches: 1-436
> Compiled by ni.va
> Huge version with GUI.
>
>
>
> Under Windows Seven 64 bits, on second launch of this Vim (deployed as standalone dir) from ~\AppData\Local\Temp, I encounter this warning :
>
> Error detected while processing ~\AppData\Local\Temp\
> Vim_x86\vim81\menu.vim:
>
> line 163:
> E121: Undefined variable: paste#paste_cmd
> E15: Invalid expression: 'vnoremenu <script> &Edit.&Paste<Tab>"+gP^I' .
> paste#paste_cmd['v']
>
>
>
>
> When I test the same launching Vim from ~/desktop
>
> Thank you for help

I know you're creating your own Vim distribution. I suspect whether this is an
issue of your distribution.

Please let us know the following things, anytime when you report an issue:

* A step-by-step reproducible way with a minimal settings.
Using `vim --clean` is preferred.
Just saying "on second launch" is unclear.
* What you see, and what you expect.
(This time, this might be enough.)
* Which version of Vim (or gVim) and which version of OS are you using?
(This time, this might be enough.)
* Does the same thing happen with the official binary from www.vim.org or
the nightly builds from vim-win32-installer?

Regards,
Ken Takata

--
--
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.
For more options, visit https://groups.google.com/d/optout.

E121 : Undefined variable: paste#paste_cmd on Vim 8.1 1-436 second launch





VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 26 2018 13:46:15)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-436
Compiled by ni.va
Huge version with GUI. Features included (+) or not (-):
+acl +emacs_tags +mouseshape -tag_any_white
+arabic +eval +multi_byte -tcl
+autocmd +ex_extra +multi_lang -termguicolors
+autochdir +extra_search -mzscheme +terminal
+autoservername +farsi -netbeans_intg -tgetent
+balloon_eval +file_in_path +num64 -termresponse
-balloon_eval_term +find_in_path +ole +textobjects
+browse +float +packages +timers
++builtin_terms +folding +path_extra +title
+byte_offset -footer -perl +toolbar
+channel +gettext/dyn +persistent_undo +user_commands
+cindent -hangul_input -postscript +vartabs
+clientserver +iconv/dyn +printer +vertsplit
+clipboard +insert_expand +profile +virtualedit
+cmdline_compl +job +python/dyn +visual
+cmdline_hist +jumplist +python3/dyn +visualextra
+cmdline_info +keymap +quickfix +viminfo
+comments +lambda +reltime +vreplace
+conceal +langmap +rightleft -vtp
+cryptv +libcall +ruby/dyn +wildignore
-cscope +linebreak +scrollbind +wildmenu
+cursorbind +lispindent +signs +windows
+cursorshape +listcmds +smartindent +writebackup
+dialog_con_gui +localmap +startuptime -xfontset
+diff +lua/dyn +statusline -xim
+digraphs +menu -sun_workshop -xpm_w32
+directx +mksession +syntax -xterm_save
-dnd +modify_fname +tag_binary
-ebcdic +mouse +tag_old_static
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
defaults file: "$VIMRUNTIME\defaults.vim"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_TERMINAL -DFEAT_JOB_CHANNEL -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /MP -DHAVE_STDINT_H /O2 /GL -DNDEBUG /arch:IA32 /Zl /MT -DFEAT_OLE -DFEAT_MBYTE -DFEAT_GUI_W32 -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua54.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python37.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=25 -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby250.dll\" -DFEAT_HUGE /Fd.\ObjGXOUYHRi386/ /Zi
Linking: link /RELEASE /nologo /subsystem:windows /opt:ref /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib netapi32.lib uuid.lib /machine:i386 gdi32.lib version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib netapi32.lib /machine:i386 libcmt.lib oleaut32.lib user32.lib /nodefaultlib:lua54.lib /nodefaultlib:python27.lib /nodefaultlib:python37.lib WSock32.lib /PDB:gvim.pdb -debug

Error detected while processing ~\AppData\Local\Temp\
Vim_x86\vim81\menu.vim:

line 163:

E121: Undefined variable: paste#paste_cmd

E15: Invalid expression: 'vnoremenu <script> &Edit.&Paste<Tab>"+gP^I' .
paste#paste_cmd['v']

Hi,

I use this last built version of Vim.

VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 26 2018 13:46:15)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-436
Compiled by ni.va
Huge version with GUI.



Under Windows Seven 64 bits, on second launch of this Vim (deployed as standalone dir) from ~\AppData\Local\Temp, I encounter this warning :

Error detected while processing ~\AppData\Local\Temp\
Vim_x86\vim81\menu.vim:

line 163:
E121: Undefined variable: paste#paste_cmd
E15: Invalid expression: 'vnoremenu <script> &Edit.&Paste<Tab>"+gP^I' .
paste#paste_cmd['v']




When I test the same launching Vim from ~/desktop

Thank you for help

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Tuesday, September 25, 2018

Re: Vim Silent Install Issue

Hi,

2018/9/14 Fri 17:27:52 UTC+9 Devashish Kar wrote:
> On Thursday, September 6, 2018 at 2:36:41 PM UTC+5:30, Devashish Kar wrote:
> > Hi Team
> >
> > With the latest version of Vim, I can see a pop-up coming at the end of install asking if we want to see the README file (snapshot attached). Being an admin, my job is to install it silently (using "gvim81.exe /S") in a Win10 machine but this box is not being suppressed, can you help me do that?
> >
> > Thanks!
> >
> > -Devashish
>
> Hi All, been a long time but got no response on this. Can somebody suggest me if there's any possibility to suppress the box during the end of install?

Sorry for the late response.
This is a well known issue and there are some PR for this.
E.g. https://github.com/vim/vim/pull/751

Moreover, there are many TODO items in the todo.txt:
Improve the installer for MS-Windows. There are a few alternatives:
- Add silent install option. (Shane Lee, #751)
- Installer from Cream (Steve Hall).
- Modern UI 2.0 for the Nsis installer. (Guopeng Wen)
https://github.com/gpwen/vim-installer-mui2
- make it possible to do a silent install, see
http://nsis.sourceforge.net/Docs/Chapter4.html#4.12
Version from Guopeng Wen does this.
- MSI installer: https://github.com/petrkle/vim-msi/
- The one on Issue 279.
Problem: they all work slightly different (e.g. don't install vimrun.exe).
How to test that it works well for all Vim users?

Unfortunately there are no progress.

Regards,
Ken Takata

--
--
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.
For more options, visit https://groups.google.com/d/optout.

yank to reg intermittent problem

Hi,

When I yank a line (yy) I see the msg "1 line yanked" (I have report=0)
and I have clipboard set to:
clipboard=unnamedplus,autoselect,exclude:cons\|linux
But - maybe once out of 20 time or so - the + register does not show the data.
Even if I use "+y instead of yy its the same - works fine until once in a while does not.
Any ideas ? Any suggestions for debugging ?
Where in the code does the copy to + reg occur ?

thx as always for the vim universe,
-mark

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Sunday, September 23, 2018

Re: How to use vim to write a aligned plain text (txt) file as the vim help files?

On Sat, Sep 22, 2018 at 12:02:51PM -0700, Hausen Schaff wrote:
> vim help files are in plain text format. They'are under /vim/vim80/doc.Lots of <Tab> characters are used to align the contents.
>
> Interestingly, I can't find a good way to write such <Tab> aligned texts by vim. Every plugin use space to align words. Some bring this issue up on these project homes, and no solution is provided.
>
> I'm curious how the vim developers write the help documents?

I didn't look at the documentation and help files in detail, but they
have a relatively narrow width, not too many columns width. also they
have a fixed format, linu by line.

to reproduce this you could easily use tabs or spaces to align text.
when you also use a narrow width for your document, there will be no
need for the text to rearrange itself over the full width of your screen
or window, text is formatted line by line through a sentence.

> Plugins

IMHO vim is perfect the way it is and I'm not using any plugins for this
kind of regular tasks --- that besides the fun of learning vim's
capabilities.

for the rest I mainly use vim to make text with basic markdown that I
process with pandoc to make nice pdf's, and pandoc does the clean
outlining of markedup text.

my solution would be to set the right tabwith or tabstops at the needed
position of the rightmost column in vim and/or use spaces
to make a column layout. find out how to automate with basic vim, best
is to make your document and do the formatting afterwards (vim-way:
separating writing and editing)

when you want to make such files to publish as pdf or whatever
environment, just use basic
[markdown](http://daringfireball.net/projects/markdown/) as a markup
language and use pandoc to convert it to your needed environment.
markdown has some great ways to produce a good layout.

in vim I use markdown to make nice aligned lists with

* text after the bullet goes here

text in a separate paragraph that belongs to the bullet above is
indended in vim with '>>'

//meine

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Saturday, September 22, 2018

Re: How to use vim to write a aligned plain text (txt) file as the vim help files?

2018-09-22 21:02 GMT+02:00, Hausen Schaff <seaspeak@gmail.com>:
> Interestingly, I can't find a good way to write such <Tab> aligned texts by
> vim. Every plugin use space to align words. Some bring this issue up on
> these project homes, and no solution is provided.

:set noexpandtab
--
Kit

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: How to use vim to write a aligned plain text (txt) file as the vim help files?

On Sat, Sep 22, 2018 at 11:48 PM Hausen Schaff <seaspeak@gmail.com> wrote:
>
> vim help files are in plain text format. They'are under /vim/vim80/doc.Lots of <Tab> characters are used to align the contents.
>
> Interestingly, I can't find a good way to write such <Tab> aligned texts by vim. Every plugin use space to align words. Some bring this issue up on these project homes, and no solution is provided.
>
> I'm curious how the vim developers write the help documents?
>
> Plugins
> -----------------------------------------------------------
> vim-easy-align: Align to Nearest Tabstop #58 https://git.io/fAdXc
> tabular: https://git.io/fAdXW
>
> Excerpted from vim's help
> -----------------------------------------------------------
> Development of Vim. *development*
>
> This text is important for those who want to be involved in further developing
> Vim.
>
> 1. Design goals |design-goals|
> 2. Coding style |coding-style|
> 3. Design decisions |design-decisions|
> 4. Assumptions |design-assumptions|

The following answer does not cover any third-party plugin, as I
personally don't use them for tabbing. OTOH, all or part of it may (or
may not) rely to running in 'nocompatible' mode, which nowadays is
IIUC the default except when the -C command-line switch (or -u
followed by other than DEFAULTS) is used.

Several options govern what happens when you hit the Tab key in Insert
mode in Vim. Once they are set the way you want them, aligning files
by tabbing should become a piece of cake. I'm summarizing them below
but you should check the online help about them, it is more detailed.

* 'expandtab' or 'et' is a Boolean buffer-local option, default off.
When on, hitting the Tab key produces an appropriate number of spaces.
Existing hard tabs won't be altered until or unless you |:retab|
(q.v.) but new ones won't be added unless you "force" them by hitting
Ctrl-V (in Insert mode) immediately before hitting Tab (or Ctrl-I).
(On the latter "forcing" point, see the help about |i_CTRL-V|.)
* 'tabstop' or 'ts' is a numeric buffer-local option, default 8. When
a hard tab is encountered in a text file, it will push the next
character by n columns, where 1 <= n <= &ts, in order to bring that
"next character after the tab" in a column whose number (the leftmost
column being 1) is 1 more than a multiple of &ts. For the default
value of 8, this means that the next character will be in the next
column in the list [9, 17, 25, 33, 41, …]. (Column 1 can of course not
be preceded by a tab ending in column 0.)
* 'softtabstop' or 'sts' is a numeric buffer-local option; its default
is 0 which means "soft tabs are off". When positive and 'et' above is
off, hitting the Tab key moves to the next "soft tab" of this width by
inserting the appropriate number of "hard tabs" (calculated as for
'ts' above) and, if this "soft tab stop point" does not coincide with
a "hard tab stop point", additional spaces are added as necessary.
When 'sts' is any negative number, the value of 'sw' (below) is used.
* 'shiftwidth' or 'sw' is a numeric option (default 8) which is only
used for indenting. It governs by how much autoindenting (if enabled)
and the manual indent commands (such as << >> etc.) will move the
whole line left or right when going from one indentation level to the
next. When zero the value of 'ts' above is used.
* 'smarttab' or 'sta' is a Boolean global option, default off. When it
is on, hitting the Tab key will insert tabs if used at the start of a
line, or spaces if used elsewhere.

See the online help for each of these options, and a few additional
ones, as follows:
:h 'et'
:h :retab
:h i_CTRL-V
:h 'ts'
:h 'sts'
:h 'sw'
:h 'sta'
:h ins-expandtab (and the whole 33-line section starting with it)
:h :set
and note that ":set option?" with question mark always
displays the value while ":set option" with nothing after the name
sets the value to TRUE when used with a Boolean option but displays
the value when used with a non-Boolean option. So when in doubt (and
maybe even when not in doubt), always use a question mark to display
the value without changinig it. (If the value of a Boolean option is
FALSE, the option name will be displayed prefixed by "no".)

The help for 'tabstop' also has a discussion of the various possible
ways to use the tabbing options described above.

Oh, and for help files in particular, see also ":h modeline"

Best regards,
Tony.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

How to use vim to write a aligned plain text (txt) file as the vim help files?

vim help files are in plain text format. They'are under /vim/vim80/doc.Lots of <Tab> characters are used to align the contents.

Interestingly, I can't find a good way to write such <Tab> aligned texts by vim. Every plugin use space to align words. Some bring this issue up on these project homes, and no solution is provided.

I'm curious how the vim developers write the help documents?

Plugins
-----------------------------------------------------------
vim-easy-align: Align to Nearest Tabstop #58 https://git.io/fAdXc
tabular: https://git.io/fAdXW

Excerpted from vim's help
-----------------------------------------------------------
Development of Vim. *development*

This text is important for those who want to be involved in further developing
Vim.

1. Design goals |design-goals|
2. Coding style |coding-style|
3. Design decisions |design-decisions|
4. Assumptions |design-assumptions|

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: No Cyrlillic text in CP866

Hello, Tony, and many thanks for your reply.

> Yeah, I've made encoding issues in Vim a kind of
> "specialty" of mine, ever since I came to Vim,
> found that it supported UTF-8 (which, unbeknownst
> to me, was a sort of novelty at the time) tried to
> understand what the help said about it, succeeded,
> and wrote a FAQ chapter and a few wiki pages which
> IIRC Bram later used to fill up the already exist-
> ing multibyte documentation.

It is my heretic opinion that Unicode is an overhead
in many cases, including Russian-English texts non
meant for noble typography (with ligatures and ad-
vanced punctuation). Fixed-width character sents,
especially 8-bit ones, super easy to work with,
whereas with Unicode one has to rely on third-party
libraries because efficient implementation is no
easy matter. Although this argument does not apply
to the case in question, I always try to follow the
rule of using the simlest solution possible, which
is why I have tried to configure Vim internally to
use the native character set of my terminal. It
turned out more difficult than using Unicode all-
through whenever possible and converting while read-
ing and writing.

> I have absolutely no experience with CP866, the
> mixed Cyrillic/Latin texts that I write (e.g. the
> dictionary accessed, among others, at
> http://users.skynet.be/antoine.mechelynck/slovarj/ru-fr.abbrev.html
> -- letters А "ah" to part of С "es" already exist)
> are in UTF-8, and my reasoned opinion in this mat-
> ter is that even to read and write files in CP866,
> Windows-1251 or KOI8-R, our friend Антон Шепелев
> ;-) should set 'encoding' to UTF-8 near the top of
> his vimrc (defining the *internal* charset used by
> Vim to be the Universal one) while converting when
> reading and writing by means of 'fileencodings'
> (plural) (q.v.) when possible and of 'fileencod-
> ing' (singular) (see :help ++enc) when necessary.

I believe it the standard setup, and am using it,
but I wonder if Vim can be made to work with bilin-
gual texts in

:set encoding=cp866

When I thus set it, it displays correctly everying
that has been typed theretofre, but shows nothing
when I type in Russian in this mode. Look like a
problem with interpreting the keypresses...

> and assuming "of course" that either Vim is com-
> piled with +iconv, or it is compiled with
> +iconv/dyn and there is an iconv.dll or libi-
> conv.dll where Vim can find it

Yes, mine has it.

> See https://vim.wikia.com/wiki/Working_with_Uni-
> code for more information. Don't miss it! It is a
> little verbose but it should clarify the difficult
> parts which undoubtedly exist in the above para-
> graph.

And I will. Thanks again for so detailed an answer,
Tony.

--
() ascii ribbon campaign -- against html e-mail
/\ http://preview.tinyurl.com/qcy6mjc [archived]

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Friday, September 21, 2018

Re: vim & platformio

On 09/13 08:20, Christian Brabandt wrote:
>
> On Mi, 12 Sep 2018, arocker@Vex.Net wrote:
>
> > >
> > > What is platformio?
> > >
> >
> > Almost certainly this: https://platformio.org/platformio-ide
>
> So it is an IDE. While one can "pimp" Vim to become more IDE like by
> using plugins such as ALE, gitgutter, youcompleteme and the like, it
> often won't help with more sophisticated features like debugging (might
> be possible with the new termdebug plugin for C) or refactoring.
>
> Some IDE let you define an external editor so you could edit using Vim.
> But you might still lose some of the more sophisticated features and it
> might be a bit clunky.
>
> So in general one either uses either Vim or an IDE, depending on your
> personal needs (e.g. whether you need those features that the ide
> provides). I guess there is no general answer to that question.
>
> Best,
> Christian
> --
> Hallo Tagsüberchatter!
>
> --
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.
>


Hi,

sorry for being so quiet the last days...I had to rebuild my GENTOO
Linux system from ground up by recompiling mainly the whole
system...additionally my mailer crashed several time with memory
corruption failures...I am back to an older version of it, which works
fine.

Platformio is a cli command, with which one mainly can setup the
complete ecosystem for currently 547 different evaluation / tinker / maker /
whatever boards and platforms. It does all this difficult stuff to
setup a working target compiler environment and the according build
system.
Visual Code for example has a plugin for it.

Most of the time I like build systems which editors are more "bare metal"
more than those, which always try to suggest new and better things
while I am typing.
Vim - therefore - is my friend... :)

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.
For more options, visit https://groups.google.com/d/optout.

Re: What is the quickes way to delete spaces in front of each line?

On 09/20/2018 09:32 PM, Tim Chase wrote:
> On 2018-09-20 20:07, Michael Henry wrote:
>> On 09/19/2018 11:36 AM, Tim Chase wrote:
>>> or the visual selection
>>>
>>> :'<,'>le
>>
>> Adding to Tim's suggestion: if you are going to change the
>> indentation on the entire paragraph, then ``vip`` is an easy way
>> to select the lines of interest without counting; then typing
>> ``:%le`` will automatically use the visual range because Vim
>> will insert the line range ``'<,'>`` for you.
>
> Just a tweak: If you're using visual mode, you don't want to type
> the "%", just the ":le".

Oops - quite right, thanks for the correction :-)

Michael Henry

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Thursday, September 20, 2018

Re: What is the quickes way to delete spaces in front of each line?

On 2018-09-20 20:07, Michael Henry wrote:
> On 09/19/2018 11:36 AM, Tim Chase wrote:
> > or the visual selection
> >
> > :'<,'>le
>
> Adding to Tim's suggestion: if you are going to change the
> indentation on the entire paragraph, then ``vip`` is an easy way
> to select the lines of interest without counting; then typing
> ``:%le`` will automatically use the visual range because Vim
> will insert the line range ``'<,'>`` for you.

Just a tweak: If you're using visual mode, you don't want to type
the "%", just the ":le".

-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.
For more options, visit https://groups.google.com/d/optout.

Re: What is the quickes way to delete spaces in front of each line?

On 09/19/2018 11:36 AM, Tim Chase wrote:
> On 2018-09-19 07:53, Igor Forca wrote:
>> I lot of times I have text something like:
>>
>> Sample:
>> ----Lorem ipsum dolor sit amet,
>> --consectetur adipiscing elit,
>> --------sed do eiusmod tempor
>> ---incididunt ut labore et dolore
>> ---magna aliqua.
>>
>> Note: Characters "-" symbolizes spaces.
>>
>> I need to delete spaces in as quicker way as possible.

> If you don't have to manually select which lines should be
> de-dented, you can also use
>
> :%le
>
> which uses the :left command to remove all leading space. It works
> with any range
>
> :10,20le
>
> or the visual selection
>
> :'<,'>le

Adding to Tim's suggestion: if you are going to change the
indentation on the entire paragraph, then ``vip`` is an easy way
to select the lines of interest without counting; then typing
``:%le`` will automatically use the visual range because Vim
will insert the line range ``'<,'>`` for you.

Tim continued:
> Alternatively, you can select a range with visual mode and use
> the "<" command with a ridiculously large prefix-count like
> "99<" to dedent the selected rows by 99 levels of 'shiftwidth'

Similarly, you can ``vip`` followed by ``99<`` to use this
second method on a paragraph.

I find that text objects such as ``ip`` (inner paragraph) come
in handy very often, saving me from trying to count lines or
from starting visual selection mode and moving down a line at a
time or whatever.  It's another tool in the toolbox that I use
frequently.  ``:help text-objects`` for more details.

Michael Henry

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Wednesday, September 19, 2018

Re: No Cyrlillic text in CP866

On Thu, Sep 20, 2018 at 4:21 AM Charles E Campbell
<drchip@campbellfamily.biz> wrote:
>
> Anton Shepelev wrote:
> > Hello, all
> >
> > I am using text-mode Vim on Windows XP, where 'chcp'
> > tells me that the terminal encoding is cp866. Why
> > can't I type Russian characters with enc=cp866? It
> > works with enc=utf-8, though, but I expect Vim also
> > to support Cyrillic while using and encoding that
> > matches with that of the terminal...
> >
> This sounds like a problem for Tony Mechelynck; from what I've seen,
> he's really good at encoding issues. Unfortunately, it appears that he
> didn't see your plaint, and he seems to be responding via github
> recently and so his email is hidden. I've sent him this message with
> BCC: .
>
> Regards,
> Chip Campbell

I answer via github to messages which originate on github, because
otherwise my name is replaced on github by some robot ID; but
basically I follow the vim_use and vim_dev newsgroups.

Yeah, I've made encoding issues in Vim a kind of "specialty" of mine,
ever since I came to Vim, found that it supported UTF-8 (which,
unbeknownst to me, was a sort of novelty at the time) tried to
understand what the help said about it, succeeded, and wrote a FAQ
chapter and a few wiki pages which IIRC Bram later used to fill up the
already existing multibyte documentation.

However, it's been years and years since I've left Windows, my present
system is openSUSE Linux 15.0, and it has a "sane" locale policy,
using UTF-8 wherever possible: my system locale comes as
$LANG=en_US.UTF-8 (meaning "use that for all not otherwise specified
parts of the locale", and in particular for $LC_CTYPE, which Vim uses
at startup to set the default 'encoding').

I have absolutely no experience with CP866, the mixed Cyrillic/Latin
texts that I write (e.g. the dictionary accessed, among others, at
http://users.skynet.be/antoine.mechelynck/slovarj/ru-fr.abbrev.html
letters А "ah" to part of С "es" already exist) are in UTF-8, and my
reasoned opinion in this matter is that even to read and write files
in CP866, Windows-1251 or KOI8-R, our friend Антон Шепелев ;-) should
set 'encoding' to UTF-8 near the top of his vimrc (defining the
*internal* charset used by Vim to be the Universal one) while
converting when reading and writing by means of 'fileencodings'
(plural) (q.v.) when possible and of 'fileencoding' (singular) (see
:help ++enc) when necessary. If the Windows locale is CP866 (which is
an 8-bit encoding and therefore should come last in 'fileencodings')
my guess is that setting 'encoding' to utf-8 and 'fileencodings'
(plural) to ucs-bom,utf-8,cp866 ought to give good results; however it
will read Latin1 as if it were CP866. The alternative (if
'fileencodings' contains Latin1 instead of cp866) is to _always_ read
CP866 files with ++enc=cp866 as a modifier to the :e[dit] statement:
Vim will then remember it when writing back the modified file.
Similarly ++enc=koi8-r or ++enc=Windows-1251 as appropriate (and
assuming "of course" that either Vim is compiled with +iconv, or it is
compiled with +iconv/dyn and there is an iconv.dll or libiconv.dll
where Vim can find it).

See https://vim.wikia.com/wiki/Working_with_Unicode for more
information. Don't miss it! It is a little verbose but it should
clarify the difficult parts which undoubtedly exist in the above
paragraph.

Best regards,
Tony.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: What is the quickes way to delete spaces in front of each line?

Igor Forca wrote:
> Now reading Recardo's post (second post in thread) and playing around I have found there is:
> diw
> j.
> j.
> j.
> j.
>
> Which is exactly what I was looking for. No need for count (ed command), or no need for selecting for video.

"diw"? That's some vim-ism, isn't it? Replace "diw" with "d^" and it
works in any version of vi you can find. As a motion command, "^" goes
to the first non-whitespace character on the line (forward or backward,
natch so "0d^" may be a better starting command). Also "d^" is a no-op
when run at the beginning of the line with no leading whitespace, but
"diw" appears to delete the first word in that case.

Elijah

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: What is the quickes way to delete spaces in front of each line?

On 09/19/2018 08:53 AM, Igor Forca wrote:
> I know there is ed command: 1,5s/^\s\+// but this is difficult to type
> quickly and requires a lot of thinking.

I don't know about difficult to type. I type things like that quite
frequently.

As for (a lot of) thinking, well, I find that most of vim's power
requires some thinking.

Unless I had a reason not to, I'd likely use %s/^\s\+// and apply it to
the entire buffer.

> Using some normal command and repeating j. would be much simpler to
> think and edit.

I find that repeating commands gets tedious quite quickly. Especially
if you're munging data. Hence why I like regular expressions like the
one above, or macros (possibly of the recursive variety). Why should I
have to mentally execute the test to see if I need to apply the action
to the line when I can have the computer do it for me. I just need to
tell the computer what to do.

IMHO regular expressions and and macros lend themselves to more
automation. It might even be possible to move the regular expression to
a (s)ed script.



--
Grant. . . .
unix || die

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: What is the quickes way to delete spaces in front of each line?

Now reading Recardo's post (second post in thread) and playing around I have found there is:
diw
j.
j.
j.
j.

Which is exactly what I was looking for. No need for count in (command mode), or no need for selecting (visual mode). I somehow prefer using normal mode, it is quicker and easier to partial undo.

Despite my preference all other ideas are excellent and I will use them this or some other times.

Thanks a lot for ideas and tips.
Regards

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: What is the quickes way to delete spaces in front of each line?

Now reading Recardo's post (second post in thread) and playing around I have found there is:
diw
j.
j.
j.
j.

Which is exactly what I was looking for. No need for count (ed command), or no need for selecting for video.

Despite my preference all other ideas are excellent and I will use them this or some other times.

Thanks a lot for ideas and tips.
Regards

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: What is the quickes way to delete spaces in front of each line?

On 2018-09-19 17:36, Claus Atzenbeck wrote:
> P.S. I know there is ed command: 1,5s/^\s\+// but this is difficult
> to type quickly and requires a lot of thinking. Using some normal
> command and repeating j. would be much simpler to think and edit.
> >
> I probably would mark the paragraph in visual mode, then use
>
> :s/^ *//
>
> which I find easy to remember and quick to type. (No need for
> "\s\+" which is just more to type compared to " *".)

If you're looking for additional laziness, if you don't have any
flags (you don't in this case), you can drop the last "/", and if
you're *also* replacing with nothing (i.e., deleting the match), you
can drop the separator "/" too, making it just

:s/^ *

If the file has a mix of tabs & spaces, you can

:s/^\s*

-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.
For more options, visit https://groups.google.com/d/optout.

Re: What is the quickes way to delete spaces in front of each line?

On Wed, 19 Sep 2018 at 7:53am -0700, Igor Forca wrote:

P.S. I know there is ed command: 1,5s/^\s\+// but this is difficult to type quickly and requires a lot of thinking. Using some normal command and repeating j. would be much simpler to think and edit.

I probably would mark the paragraph in visual mode, then use

 :s/^ *//

which I find easy to remember and quick to type. (No need for "\s\+" which is just more to type compared to " *".)

You also could mark the paragraph and do a few left shifts via

 <.....

"<" would shift the marked paragraph to the left; each dot would repeat this. Continue pressing "." until all lines have reached column 1.

Maybe this helps.

Best,
Claus

Re: What is the quickes way to delete spaces in front of each line?

On 2018-09-19 07:53, Igor Forca wrote:
> I lot of times I have text something like:
>
> Sample:
> ----Lorem ipsum dolor sit amet,
> --consectetur adipiscing elit,
> --------sed do eiusmod tempor
> ---incididunt ut labore et dolore
> ---magna aliqua.
>
> Note: Characters "-" symbolizes spaces.
>
> I need to delete spaces in as quicker way as possible.
>
> Now I do it with command "delete to character" and move down cursor
> like: dtL
>
> Is there a quicker way?
>
> What would be nice is to have "some command" and then just use j.
> to move cursor down and repeat the command.
>
> P.S. I know there is ed command: 1,5s/^\s\+// but this is difficult
> to type quickly and requires a lot of thinking. Using some normal
> command and repeating j.

If you don't have to manually select which lines should be de-dented,
you can also use

:%le

which uses the :left command to remove all leading space. It works
with any range

:10,20le

or the visual selection

:'<,'>le

or with matching lines:

:g/pattern/le

You can read more at

:help :left

(there's also a ":center" and a ":right" that use the 'textwidth'
setting if you want those)

Alternatively, you can select a range with visual mode and use the
"<" command with a ridiculously large prefix-count like "99<" to
dedent the selected rows by 99 levels of 'shiftwidth'

:help <

Hope these help,

-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.
For more options, visit https://groups.google.com/d/optout.

Re: What is the quickes way to delete spaces in front of each line?

Hi,

On 9/19/18 3:53 PM, Igor Forca wrote:
> Hi,
>
> I lot of times I have text something like:
>
> Sample:
> ----Lorem ipsum dolor sit amet,
> --consectetur adipiscing elit,
> --------sed do eiusmod tempor
> ---incididunt ut labore et dolore
> ---magna aliqua.
>
> Note: Characters "-" symbolizes spaces.
>
>
> I need to delete spaces in as quicker way as possible.
>
> Now I do it with command "delete to character" and move down cursor like:
> dtL
> j
> dtc
> j
> dts
> j
> dti
> j
> dtm
>
> Is there a quicker way?
>
> What would be nice is to have "some command" and then just use j. to move cursor down and repeat the command.

Try "dw".

>
> P.S. I know there is ed command: 1,5s/^\s\+// but this is difficult to type quickly and requires a lot of thinking. Using some normal command and repeating j. would be much simpler to think and edit.

Check "gq" (:help gq).

> Thanks
>

--
--
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.
For more options, visit https://groups.google.com/d/optout.

What is the quickes way to delete spaces in front of each line?

Hi,

I lot of times I have text something like:

Sample:
----Lorem ipsum dolor sit amet,
--consectetur adipiscing elit,
--------sed do eiusmod tempor
---incididunt ut labore et dolore
---magna aliqua.

Note: Characters "-" symbolizes spaces.


I need to delete spaces in as quicker way as possible.

Now I do it with command "delete to character" and move down cursor like:
dtL
j
dtc
j
dts
j
dti
j
dtm

Is there a quicker way?

What would be nice is to have "some command" and then just use j. to move cursor down and repeat the command.

P.S. I know there is ed command: 1,5s/^\s\+// but this is difficult to type quickly and requires a lot of thinking. Using some normal command and repeating j. would be much simpler to think and edit.
Thanks

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: é char in balloonexpr

Le vendredi 14 septembre 2018 20:05:02 UTC+2, Tony Mechelynck a écrit :
> On Fri, Sep 14, 2018 at 6:27 PM Bram Moolenaar <Bram@moolenaar.net> wrote:
> >
> >
> > Ni Va wrote:
> >
> > > I have done balloonexpr() func that returns string that contains é
> > > char to display in the balloon.
> > >
> > > Display is bad formatted.
> > >
> > > How can I force balloon encoding ? maybe in latin ?
> >
> > Terminal or GUI?
> >
> > Can you give a (small) example?
>
> And also:
> - Which major/minor/patch version of Vim? (The latest as of this
> writing is 8.1.388)
> - I suppose +balloon_eval and/or +balloon_eval_term are compiled-in,
> aren't they?
> - Which OS? If GUI, which GUI flavour (Windows / MacVim / GTK3 / GTK2
> / Athena / Motif / ...)
> (Any answers to the above that you might not know can be
> found in the output of the :version statement.)
> - What does Vim answer to
> :verbose set encoding? termencoding? ballooneval?
> balloonevalterm? balloonexpr?
> :lang
> ?
> - If you start the same Vim executable with --clean on the
> command-line, what is 'encoding' set to? (IOW, what is the system
> locale charset?)
> - Is there a :scriptencoding statement (with which operand) near the
> top of your vimrc?
>
> (N.B. From ":verbose set" to "balloonexpr?" above it's to be typed all
> on one line with all the question marks in it.)
>
> Best regards,
> Tony.

Here is informations in atteched file.


VIM - Vi IMproved 8.1 (2018 May 18, compiled Sep 19 2018 09:39:15)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-408
Compiled by ni.va@YA
Huge version with GUI. Features included (+) or not (-):
+acl +emacs_tags +mouseshape -tag_any_white
+arabic +eval +multi_byte -tcl
+autocmd +ex_extra +multi_lang -termguicolors
+autochdir +extra_search -mzscheme +terminal
+autoservername +farsi -netbeans_intg -tgetent
+balloon_eval +file_in_path +num64 -termresponse
-balloon_eval_term +find_in_path +ole +textobjects
+browse +float +packages +timers
++builtin_terms +folding +path_extra +title
+byte_offset -footer -perl +toolbar
+channel +gettext/dyn +persistent_undo +user_commands
+cindent -hangul_input -postscript +vartabs
+clientserver +iconv/dyn +printer +vertsplit
+clipboard +insert_expand +profile +virtualedit
+cmdline_compl +job +python/dyn +visual
+cmdline_hist +jumplist +python3/dyn +visualextra
+cmdline_info +keymap +quickfix +viminfo
+comments +lambda +reltime +vreplace
+conceal +langmap +rightleft -vtp
+cryptv +libcall +ruby/dyn +wildignore
-cscope +linebreak +scrollbind +wildmenu
+cursorbind +lispindent +signs +windows
+cursorshape +listcmds +smartindent +writebackup
+dialog_con_gui +localmap +startuptime -xfontset
+diff +lua/dyn +statusline -xim
+digraphs +menu -sun_workshop -xpm_w32
+directx +mksession +syntax -xterm_save
-dnd +modify_fname +tag_binary
-ebcdic +mouse +tag_old_static
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
system gvimrc file: "$VIM\gvimrc"
user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$HOME\vimfiles\gvimrc"
3rd user gvimrc file: "$VIM\_gvimrc"
defaults file: "$VIMRUNTIME\defaults.vim"
system menu file: "$VIMRUNTIME\menu.vim"
Compilation: cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32 -DFEAT_TERMINAL -DFEAT_JOB_CHANNEL -DWINVER=0x0501 -D_WIN32_WINNT=0x0501 /MP -DHAVE_STDINT_H /O2 /GL -DNDEBUG /arch:IA32 /Zl /MT -DFEAT_OLE -DFEAT_MBYTE -DFEAT_GUI_W32 -DFEAT_DIRECTX -DDYNAMIC_DIRECTX -DFEAT_DIRECTX_COLOR_EMOJI -DDYNAMIC_ICONV -DDYNAMIC_GETTEXT -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL=\"lua54.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python37.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY -DDYNAMIC_RUBY_VER=25 -DDYNAMIC_RUBY_DLL=\"msvcrt-ruby250.dll\" -DFEAT_HUGE /Fd.\ObjGXOUYHRi386/ /Zi
Linking: link /RELEASE /nologo /subsystem:windows /opt:ref /LTCG:STATUS oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib comdlg32.lib ole32.lib netapi32.lib uuid.lib /machine:i386 gdi32.lib version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib netapi32.lib /machine:i386 libcmt.lib oleaut32.lib user32.lib /nodefaultlib:lua54.lib /nodefaultlib:python27.lib /nodefaultlib:python37.lib WSock32.lib /PDB:gvim.pdb -debug

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Tuesday, September 18, 2018

Re: isident and iskeyword treat @ differently

John Little wrote:

> (On Linux with encoding=utf-8) After
>
> :set isident=@ iskeyword=@
>
> \k matches Greek letters, but \i does not. The help states that both have the format of isfname, which says
>
> Multi-byte characters 256 and above are always included, only the
> characters up to 255 are specified with this option.

Well, it uses the format of 'isfname', but not the meaning.

> While I'm at it, \k (and \f) do not match some punctuation, even above 256. For example,
>
> ; U+037E GREEK QUESTION MARK
>
> IMO this is good, perhaps the help should be revised.

Yes, changing the meaning will cause trouble.

Perhaps it's sufficient to mention the meaning for the option. for
'isident':
See 'isfname' for a description of the format of this
option. For '@' only characters up to 255 are used.


For 'iskeyword':
See 'isfname' for a description of the format of this option.
For '@' characters above 255 check the "word" character class.


--
hundred-and-one symptoms of being an internet addict:
83. Batteries in the TV remote now last for months.

/// 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.
For more options, visit https://groups.google.com/d/optout.

isident and iskeyword treat @ differently

(On Linux with encoding=utf-8) After

:set isident=@ iskeyword=@

\k matches Greek letters, but \i does not. The help states that both have the format of isfname, which says

Multi-byte characters 256 and above are always included, only the
characters up to 255 are specified with this option.

While I'm at it, \k (and \f) do not match some punctuation, even above 256. For example,

; U+037E GREEK QUESTION MARK

IMO this is good, perhaps the help should be revised.

Regards, John Little

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Sunday, September 16, 2018

Re: How do I delete from the end of the line through space (up to) the first word?

On Tue, Sep 04, 2018 at 04:24:00PM -0600, 'Grant Taylor' via vim_use wrote:
> How do I delete from the end of the line (where the cursor is at)
> through the space after the first word?
>
> example.net <-- actually important
> different.example.com <-- not actually important

in a macro: 0WhD
j.

//meine

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Friday, September 14, 2018

Re: replace s/ from current cursor position

On Friday, September 14, 2018 at 10:10:53 AM UTC-5, Ni Va wrote:
> Hi,
>
> In the same line I got these :
>
>
> "foo" "bar
> bar bar
> bar bar bar
> "
>
>
> Would like to replace only "bar......" .
>
>
> Is it possible with a range just before s/"\_.\{-}"/"REPLACE"/ ?
>

It is very unclear what you are asking. A before/after text example, plus the current cursor position (if that's actually important to your question) would be helpful.

For now, all I can help with is to say that you can include the current cursor position in a pattern by including '\%#' in the pattern where you want to match the cursor. See ":help /\%#".

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: é char in balloonexpr

On Fri, Sep 14, 2018 at 6:27 PM Bram Moolenaar <Bram@moolenaar.net> wrote:
>
>
> Ni Va wrote:
>
> > I have done balloonexpr() func that returns string that contains é
> > char to display in the balloon.
> >
> > Display is bad formatted.
> >
> > How can I force balloon encoding ? maybe in latin ?
>
> Terminal or GUI?
>
> Can you give a (small) example?

And also:
- Which major/minor/patch version of Vim? (The latest as of this
writing is 8.1.388)
- I suppose +balloon_eval and/or +balloon_eval_term are compiled-in,
aren't they?
- Which OS? If GUI, which GUI flavour (Windows / MacVim / GTK3 / GTK2
/ Athena / Motif / ...)
(Any answers to the above that you might not know can be
found in the output of the :version statement.)
- What does Vim answer to
:verbose set encoding? termencoding? ballooneval?
balloonevalterm? balloonexpr?
:lang
?
- If you start the same Vim executable with --clean on the
command-line, what is 'encoding' set to? (IOW, what is the system
locale charset?)
- Is there a :scriptencoding statement (with which operand) near the
top of your vimrc?

(N.B. From ":verbose set" to "balloonexpr?" above it's to be typed all
on one line with all the question marks in it.)

Best regards,
Tony.

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: é char in balloonexpr

Ni Va wrote:

> I have done balloonexpr() func that returns string that contains é
> char to display in the balloon.
>
> Display is bad formatted.
>
> How can I force balloon encoding ? maybe in latin ?

Terminal or GUI?

Can you give a (small) example?

--
The real
trick is
this: to
keep the
lines as
short as
possible
and keep
the size
the same
yet free
from the
need for
hyphena-
Dammit!! (Matthew Winn)

/// 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.
For more options, visit https://groups.google.com/d/optout.

replace s/ from current cursor position

Hi,

In the same line I got these :


"foo" "bar
bar bar
bar bar bar
"


Would like to replace only "bar......" .


Is it possible with a range just before s/"\_.\{-}"/"REPLACE"/ ?

Thank you
NiVa

--
--
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.
For more options, visit https://groups.google.com/d/optout.

é char in balloonexpr

Hi,

I have done balloonexpr() func that returns string that contains é char to display in the balloon.

Display is bad formatted.

How can I force balloon encoding ? maybe in latin ?
Thank you
NiVa

--
--
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.
For more options, visit https://groups.google.com/d/optout.

Re: Vim Silent Install Issue

On Thursday, September 6, 2018 at 2:36:41 PM UTC+5:30, Devashish Kar wrote:
> Hi Team
>
> With the latest version of Vim, I can see a pop-up coming at the end of install asking if we want to see the README file (snapshot attached). Being an admin, my job is to install it silently (using "gvim81.exe /S") in a Win10 machine but this box is not being suppressed, can you help me do that?
>
> Thanks!
>
> -Devashish

Hi All, been a long time but got no response on this. Can somebody suggest me if there's any possibility to suppress the box during the end of install?

-Devashish

--
--
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.
For more options, visit https://groups.google.com/d/optout.