Thursday, May 31, 2018

First line starting with space affects cursor position when switching buffers

Hello,

I have encountered what appears to be a bug in vim,
but it might be a feature that I would like to disable.

To reproduce the problem:

Use vim to create a new file, and add 10 or so lines of text to the file.
In the first line, put at least two characters, and make sure the first character is a space or tab.
Place the cursor on the last line (or any line other than the first line).
Save the file (:w) and switch (:e) to view another file.
Switch back (:e) to the original file.
Notice that the cursor is on the first line, not where it was originally.

I am using vim 8.0 for Mac.

Dave McCooey

--
--
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: special characters in abbreviations

On 31.05.18 08:09, Robert Bower wrote:
> I have the following abbreviation
> iab julianheader <esc>:r!~/.bin/datevim.sh<cr>
>
> It worked fine till I swapped the caps lock and the escape key at the
> os level. FYI I am using Ubuntu 16.04 Now the abbreviation no longer
> works. I am assuming <esc> in Vim now points to capslock

If you use xmodmap to swap caps lock and the escape, then Vim should
only see the keystrokes after filtering, and be unaware that it has
occurred. Here I have only made caps lock into escape, with no reverse
mapping, It works fine with:

" ^U Uppercase current word, in insert mode:
inoremap <C-U> <Esc>gUiw`]a

That's with:

keycode 0x42 = Escape
clear Lock

in ~/.Xmodmap.

I haven't tried it with the reverse mapping as well.

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.

Re: statusline, display hand-defined IPA or other arbitrary text for character under cursor

On Thursday, May 31, 2018 at 12:19:03 PM UTC-6, Lifepillar wrote:
> On 31/05/2018 18:46, Kenneth Reid Beesley wrote:
> > On Wednesday, May 30, 2018 at 2:03:21 PM UTC-6, Kenneth Reid Beesley wrote:
>
> > My problem now is that I can input the hiragana characters, but the glyphs must be coming from some default font in the operating system (I'm using MacVim). The glyphs are wider than the glyphs in the mono font specified with 'set guifont', and so the cursor doesn't align properly with the glyphs. The buffer has a mixture of Roman character glyphs (from the mono font) and wider hiragana glyphs (from who-knows-where).
>
>... <snip>...</snip>
>
> Btw, have you played with "Use Core Text Renderer" in the Preferences?
> Try setting/unsetting the option, then open a new document window.

Thank you Life. Selecting "Use Core Text Renderer" seems to solve the problem!

Ken

--
--
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: statusline, display hand-defined IPA or other arbitrary text for character under cursor

On 31/05/2018 18:46, Kenneth Reid Beesley wrote:
> On Wednesday, May 30, 2018 at 2:03:21 PM UTC-6, Kenneth Reid Beesley wrote:

> My problem now is that I can input the hiragana characters, but the glyphs must be coming from some default font in the operating system (I'm using MacVim). The glyphs are wider than the glyphs in the mono font specified with 'set guifont', and so the cursor doesn't align properly with the glyphs. The buffer has a mixture of Roman character glyphs (from the mono font) and wider hiragana glyphs (from who-knows-where).

Do you have a specific sequence of glyphs to help us reproduce your
issue? I have tried mixing Latin with 0x3072 and 0x3073 (e.g.,
xひyびwひzび), but what I see is that upon moving over such strings
the cursor becomes as wide (or as narrow) as the underlying character.
So, I do not understand what "the cursor doesn't align properly with the
glyphs" means. To me, it looks aligned.

Btw, have you played with "Use Core Text Renderer" in the Preferences?
Try setting/unsetting the option, then open a new document window.

You might also check ':help ambiwidth'.

Life.

--
--
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: statusline, display hand-defined IPA or other arbitrary text for character under cursor

On Wednesday, May 30, 2018 at 2:03:21 PM UTC-6, Kenneth Reid Beesley wrote:
> In my 'set statusline' in .gvimrc, I have a very helpful 0x%04B code that displays the hex code point value (minimum four hex digits, zero padded) of the buffer character under the cursor.
>
> In addition to that, I'd like to be able to display an arbitrary hand-defined character or string of characters that might represent the pronunciation (e.g. in the International Phonetic Alphabet) or a keymap input sequence.
>
> In particular, I have defined a Japanese-hiragana keymap that allows me to type hi, which is intercepted by the keymap, which places the Japanese hiragana character 0x3072 in the (g)vim buffer. The line in the keymap looks like this:
>
> hi <Char-0x3072>
>
> That works just fine.
> But in addition, I'd essentially like the status line to display the reverse, such that when the cursor is on a 0x3072 character, I'd also like the statusline to display (for my own benefit) the letters hi. I don't expect vim to know that 0x3072 should cause "hi" to be displayed in the statusline---rather I would define that somewhere, in a kind of reverse-keymap file.
>
> The same mechanism could be used to display IPA symbols, or whatever, when the cursor is on a Greek, Russian, Georgian, or whatever character.

I'm using gvim (MacVim).

I've got at least the beginnings of a solution (corrections and suggestions would be welcome). The attached file revkeymap.vim (which resides in ~/.vim/plugin/) defines the function Revkeymap(), which defines a dict mapping code point values to the little strings that I want to be displayed. So, for example, the Japanese hiragana character 0x3072 is mapped to "hi", 0x3073 is mapped to "bi", etc. The function retrieves the current character under the cursor, converts it to a number (the code point value), looks up the code point value in the dict, and returns the associated string. If they key is not in the dict, then an empty string is returned.

The function is called in 'set statusline' as %{Revkeymap()}, so the "hi" string gets returned and displayed in the statusline when the cursor is over the 0x3072 character. The mapping could be extended, of course, to define IPA displays for Russian, Greek, Georgian, or whatever characters.

My problem now is that I can input the hiragana characters, but the glyphs must be coming from some default font in the operating system (I'm using MacVim). The glyphs are wider than the glyphs in the mono font specified with 'set guifont', and so the cursor doesn't align properly with the glyphs. The buffer has a mixture of Roman character glyphs (from the mono font) and wider hiragana glyphs (from who-knows-where).

--
--
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.

special characters in abbreviations

I have the following abbreviation
iab julianheader <esc>:r!~/.bin/datevim.sh<cr>

It worked fine till I swapped the caps lock and the escape key at the os level. FYI I am using Ubuntu 16.04
Now the abbreviation no longer works. I am assuming <esc> in Vim now points to capslock
From my understanding the capslock key can not be referenced in vim, so I tried using just the keycode but if I replace <esc> with the keycode for the capslock key I just get the literal string.

I have also added an additional escape key at the os level to <S-F12> and tried using that in Vim but no go.

I am new enough in Vim I am not sure where to find the answer.

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.

Wednesday, May 30, 2018

statusline, display hand-defined IPA or other arbitrary text for character under cursor

In my 'set statusline' in .gvimrc, I have a very helpful 0x%04B code that displays the hex code point value (minimum four hex digits, zero padded) of the buffer character under the cursor.

In addition to that, I'd like to be able to display an arbitrary hand-defined character or string of characters that might represent the pronunciation (e.g. in the International Phonetic Alphabet) or a keymap input sequence.

In particular, I have defined a Japanese-hiragana keymap that allows me to type hi, which is intercepted by the keymap, which places the Japanese hiragana character 0x3072 in the (g)vim buffer. The line in the keymap looks like this:

hi <Char-0x3072>

That works just fine.
But in addition, I'd essentially like the status line to display the reverse, such that when the cursor is on a 0x3072 character, I'd also like the statusline to display (for my own benefit) the letters hi. I don't expect vim to know that 0x3072 should cause "hi" to be displayed in the statusline---rather I would define that somewhere, in a kind of reverse-keymap file.

The same mechanism could be used to display IPA symbols, or whatever, when the cursor is on a Greek, Russian, Georgian, or whatever character.

Any help would be much appreciated.
Ken

--
--
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: ANN: digraphs outside of Vim

On Mon, 28 May 2018 20:00:09 +0100
"A. S. Budden" <abudden@gmail.com> wrote:

> All,
>
> As my job has changed over the years, I find myself spending less time
> using Vim and (alas) more time using Outlook. However, one of my
> favourite features of Vim for typing (with Pandoc or whatever) is
> simplicity of entering symbols using Ctrl-K and a two-letter
> representation of the symbol.
>
> I liked the feature so much that a few years ago I made a little
> python program (also available compiled as a Windows executable) to
> make those digraphs available in any application. It is only really
> for Windows, although the core GUI and digraph code can run anywhere
> python/PySide runs.
>
> Anyway, in case this is of interest to other Vim users, I thought I'd
> announce it here.
>
> The source code and instructions are available at
> https://bitbucket.org/abudden/digraph
>
> The Windows executable is here:
> https://bitbucket.org/abudden/digraph/downloads/
>
> There is a handy table of the digraphs I use most often here:
> https://bitbucket.org/abudden/digraph/raw/tip/digraph_table_landscape.pdf
>
> Al
>

Thanks, Al! But what is the LICENSE? See
https://github.com/shlomif/Freenode-programming-channel-FAQ/blob/master/FAQ.mdwn#i-want-to-release-my-code---which-open-source-licence-should-i-use



--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
First stop for Perl beginners - http://perl-begin.org/

Jessica on the phone: Sel, you're getting strange lately, but you are becoming
more amusing in the process.
http://www.shlomifish.org/humour/Selina-Mandrake/

Please reply to list if it's a mailing list post - http://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.
For more options, visit https://groups.google.com/d/optout.

Re: conditional mapping of , depending on whether plugin exists

On Wednesday, 30 May 2018 22:02:53 UTC+8, Luc Hermitte wrote:
> Hi,
>
> ----- Mail original -----
> > I use https://github.com/terryma/vim-smooth-scroll and so I bind
> > <C-d> & <C-u> to ":call smooth_scroll#down(&scroll, 5, 2)<CR>" &
> > ":call smooth_scroll#up(&scroll, 5, 2)<CR>" respectively. However I
> > would like <C-d> & <C-u> to default to their original behaviour if
> > the smooth scroll plugin isn't loaded.
> >
> > I've tried this:
> >
> > if exists('g:loaded_smoothscroll')
> > noremap <silent> <C-u> :call smooth_scroll#up(&scroll, 5, 2)<CR>
> > noremap <silent> <C-d> :call smooth_scroll#down(&scroll, 5, 2)<CR>
> > endif
> >
> > but strangely it ignores the mapping if I load it like that. That
> > means the exists('g:loaded_smoothscroll') check failed, but doing an
> > :echo exists('g:loaded_smoothscroll') does indeed return 1. I'm
> > guessing at the moment of sourcing the vimrc g:loaded_smoothscroll
> > was 0, then it got set to 1 after after the mapping got read. How do
> > I get around that?
> >
> > If it helps I actually put the variable let g:loaded_smoothscroll = 1
> > into the plugin/smooth_scroll.vim file (which did not exist in the
> > author's original version, I had to fork it myself). Is that the
> > correct place to put the g:loaded_smoothscroll variable?
>
> No, it's not.
> Autoload plugins aren't expected to have an anti-inclusion guard. Beside, plain plugins are loaded **after** the .vimrc file has been sourced.
>
> What you can do instead is to check whether the file exists with
>
> if !empty(globpath(&rtp, 'autoload/smooth_scroll.vim'))
> nnoremap ...
>
>
> This needs to be done **after** your plugin manager has kicked in to fill the `&rtp` option.
>
>
> HTH,
>
> --
> Luc Hermitte

Many thanks, it works now with the file check method.

--
--
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: vimdiff exit when files are identical?

On 2018-05-30, M Kelly wrote:
> > Another way would be to check the fold regions.
>
> Any pointer/info/tip on how to determine the non-fold region is empty ?

I think this will do it.

if foldclosedend(1) == line("$")
" Entire buffer is a closed fold
endif

See

:help foldclosedend()

Regards,
Gary

--
--
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: Bash in :shell vs :terminal

I am aware of "test -t", but I don't see how it helps here.

I want the prompt to adjust based on whether I'm using :term or :sh. So,
the method needs to work in interactive shell sessions.

-- JF

--
--
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: conditional mapping of , depending on whether plugin exists

Hi,

----- Mail original -----
> I use https://github.com/terryma/vim-smooth-scroll and so I bind
> <C-d> & <C-u> to ":call smooth_scroll#down(&scroll, 5, 2)<CR>" &
> ":call smooth_scroll#up(&scroll, 5, 2)<CR>" respectively. However I
> would like <C-d> & <C-u> to default to their original behaviour if
> the smooth scroll plugin isn't loaded.
>
> I've tried this:
>
> if exists('g:loaded_smoothscroll')
> noremap <silent> <C-u> :call smooth_scroll#up(&scroll, 5, 2)<CR>
> noremap <silent> <C-d> :call smooth_scroll#down(&scroll, 5, 2)<CR>
> endif
>
> but strangely it ignores the mapping if I load it like that. That
> means the exists('g:loaded_smoothscroll') check failed, but doing an
> :echo exists('g:loaded_smoothscroll') does indeed return 1. I'm
> guessing at the moment of sourcing the vimrc g:loaded_smoothscroll
> was 0, then it got set to 1 after after the mapping got read. How do
> I get around that?
>
> If it helps I actually put the variable let g:loaded_smoothscroll = 1
> into the plugin/smooth_scroll.vim file (which did not exist in the
> author's original version, I had to fork it myself). Is that the
> correct place to put the g:loaded_smoothscroll variable?

No, it's not.
Autoload plugins aren't expected to have an anti-inclusion guard. Beside, plain plugins are loaded **after** the .vimrc file has been sourced.

What you can do instead is to check whether the file exists with

if !empty(globpath(&rtp, 'autoload/smooth_scroll.vim'))
nnoremap ...


This needs to be done **after** your plugin manager has kicked in to fill the `&rtp` option.


HTH,

--
Luc Hermitte

--
--
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: Bash in :shell vs :terminal

On Wed, 30 May 2018, Jason Franklin wrote:

> I would like for bash to be able to discern whether it is being run with :shell or with :term. I would assume this would need to be done with an environment variable. Does this feature to do something like this already exist?

The method I know to use in scripts
is the expression (mostly in 'if':
... [ -t 0 -a -t 1 ] ...
Meanig '-t N' (asks for STDIN 0 and STDOUT 1):
'is filedescriptor N connected to a terminal ?'

So e.g. you can write in all (non C shell)shells:
-------------------------------------------------
if [ -t 0 -a -t 1 ]; then
do_terminal
else
non_terminal
fi
-------------------------------------------------
alternatively:
-------------------------------------------------
[ -t 0 -a -t 1 ] && do_terminal || non_terminal
-------------------------------------------------

AND on modern shells you better use the shell-internal
test with [[ and ]], instead of [ and ], which was
using the real program 'test'.
BUT 'or' and 'and' are different then:
-------------------------------------------------
positively negatively
[ -t 0 -a -t 1 ] != [ ! -t 0 -o ! -t 1 ]
[[ -t 0 && -t 1 ]] != [[ ! -t 0 || ! -t 1 ]]
-------------------------------------------------

May be this is all you need?

I end lots of my scripts with code for
"if called in terminal, list on pager",
because I always forget "... | less" (:-)
or "if input not a terminal, do not ask".

--
Christoph von Stuckrad * * | also XMPP = |Mail <stucki@mi.fu-berlin.de> \
Freie Universitaet Berlin |/_*| 'jabber' via|Tel(Mo.,Mi.):+49 30 838-75 459|
IT Mathematik & Informatik|\ *|stucki@jabber| (Di,Do,Fr):+49 30 77 39 6600|
Takustr. 9 / 14195 Berlin * * |.fu-berlin.de|Fax(home): +49 30 77 39 6601/


--
--
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.

Bash in :shell vs :terminal

I would like for bash to be able to discern whether it is being run with :shell or with :term. I would assume this would need to be done with an environment variable. Does this feature to do something like this already exist?

-- Jason

--
--
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: vimdiff exit when files are identical?

> Another way would be to check the fold regions.

Any pointer/info/tip on how to determine the non-fold region is empty ?

thx,
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.

conditional mapping of , depending on whether plugin exists

I use https://github.com/terryma/vim-smooth-scroll and so I bind <C-d> & <C-u> to ":call smooth_scroll#down(&scroll, 5, 2)<CR>" & ":call smooth_scroll#up(&scroll, 5, 2)<CR>" respectively. However I would like <C-d> & <C-u> to default to their original behaviour if the smooth scroll plugin isn't loaded.

I've tried this:

if exists('g:loaded_smoothscroll')
noremap <silent> <C-u> :call smooth_scroll#up(&scroll, 5, 2)<CR>
noremap <silent> <C-d> :call smooth_scroll#down(&scroll, 5, 2)<CR>
endif

but strangely it ignores the mapping if I load it like that. That means the exists('g:loaded_smoothscroll') check failed, but doing an :echo exists('g:loaded_smoothscroll') does indeed return 1. I'm guessing at the moment of sourcing the vimrc g:loaded_smoothscroll was 0, then it got set to 1 after after the mapping got read. How do I get around that?

If it helps I actually put the variable let g:loaded_smoothscroll = 1 into the plugin/smooth_scroll.vim file (which did not exist in the author's original version, I had to fork it myself). Is that the correct place to put the g:loaded_smoothscroll variable?

--
--
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, May 29, 2018

Re: vimdiff exit when files are identical?

Tim Chase wrote:

> On 2018-05-28 18:11, M Kelly wrote:
> > Is there a variable for how many diffs are present after starting
> > vimdiff ? I'd like to exit immediately with status of 0 if there
> > are no differences between the files I pass into vimdiff.
>
> Not that I know of off the top of my head (though if there is, I'd be
> glad to stash that new knowledge away), but you can do a quick check
> before invocation:
>
> diff -q file1 file2 >/dev/null && echo same || vimdiff file1 file2
>
> which could be wrapped in an alias/function to simplify the
> invocation.

Another way would be to check the fold regions.

--
The process for understanding customers primarily involves sitting around with
other marketing people and talking about what you would to if you were dumb
enough to be a customer.
(Scott Adams - The Dilbert principle)

/// 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: vim and FORTH-"IDE"-ish environment

Hi,

one problem with the terminal emulation...
I am running picocom to connect to the
FORTH sustem.
picocom can be instructed by C-A C-<someting>
key sequences similiar to screen.
These sequences are not passed through.

I skimmed through the help but didn't find
anything which seems to be linked to this.
Any idea?

Cheers
Meino



On 05/29 07:14, tuxic@posteo.de wrote:
>
> Hi David,
>
> OH! AH! YEAH!
> I didn't exspect it would be THAT easy...
> That's very nice!
> Thanks a lot!
> Cheers
> Meino
>
>
>
> On 05/29 06:08, David Woodfall wrote:
> > In-Reply-To: <20180529164204.r47eyb6yepa2n3j2@solfire>
> >
> > On Tuesday 29 May 2018 18:42,
> > tuxic@posteo.de <tuxic@posteo.de> put forth the proposition:
> > > Hi Jason,
> > >
> > > thanks a lot. That's really neat! :)
> > >
> > > What's about the other way around: How can get something
> > > like the serial terminal inside vim?
> >
> > In vim 8.1 there's the terminal plugin.
> >
> > See :help terminal and :help terminal<tab> will bring a list of other
> > help files on aspects.
> >
> > --
> >
> > Only wimps use tape backup: _real_ men just upload their important stuff
> > on ftp, and let the rest of the world mirror it ;)
> > -- Linus Torvalds, about his failing hard drive on linux.cs.helsinki.fi
> >
> > .--. oo
> > (____)//
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
> >
> > --
> > --
> > 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.
> >
>
> --
> --
> 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.
>

--
--
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 and FORTH-"IDE"-ish environment

On 05/29 06:19, David Woodfall wrote:
> On Tuesday 29 May 2018 19:14,
> tuxic@posteo.de <tuxic@posteo.de> put forth the proposition:
> >
> > Hi David,
> >
> > OH! AH! YEAH!
> > I didn't exspect it would be THAT easy...
> > That's very nice!
> > Thanks a lot!
> > Cheers
> > Meino
> >
>
> Alternatively, if you use screen you can make a vsplit window and
> have vim on one side and the terminal on the other.
>

Thanks a lot for the hint, David.

I tried Mecrisp-Stellaris FORTH in conjunction with screen in
another context and it does not work that well...staircase effect...

Cheers!
Meino

: doubler over over ( n m -- n m n m )

:)



> --
>
> Microsoft Corp., concerned by the growing popularity of the free 32-bit
> operating system for Intel systems, Linux, has employed a number of top
> programmers from the underground world of virus development. Bill Gates stated
> yesterday: "World domination, fast -- it's either us or Linus". Mr. Torvalds
> was unavailable for comment ...
> -- Robert Manners, rjm@swift.eng.ox.ac.uk, in comp.os.linux.setup
>
> .--. oo
> (____)//
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
>
> --
> --
> 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.
>

--
--
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 and FORTH-"IDE"-ish environment

On Tuesday 29 May 2018 19:14,
tuxic@posteo.de <tuxic@posteo.de> put forth the proposition:
>
> Hi David,
>
> OH! AH! YEAH!
> I didn't exspect it would be THAT easy...
> That's very nice!
> Thanks a lot!
> Cheers
> Meino
>

Alternatively, if you use screen you can make a vsplit window and
have vim on one side and the terminal on the other.

--

Microsoft Corp., concerned by the growing popularity of the free 32-bit
operating system for Intel systems, Linux, has employed a number of top
programmers from the underground world of virus development. Bill Gates stated
yesterday: "World domination, fast -- it's either us or Linus". Mr. Torvalds
was unavailable for comment ...
-- Robert Manners, rjm@swift.eng.ox.ac.uk, in comp.os.linux.setup

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'

--
--
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 and FORTH-"IDE"-ish environment

Hi David,

OH! AH! YEAH!
I didn't exspect it would be THAT easy...
That's very nice!
Thanks a lot!
Cheers
Meino



On 05/29 06:08, David Woodfall wrote:
> In-Reply-To: <20180529164204.r47eyb6yepa2n3j2@solfire>
>
> On Tuesday 29 May 2018 18:42,
> tuxic@posteo.de <tuxic@posteo.de> put forth the proposition:
> > Hi Jason,
> >
> > thanks a lot. That's really neat! :)
> >
> > What's about the other way around: How can get something
> > like the serial terminal inside vim?
>
> In vim 8.1 there's the terminal plugin.
>
> See :help terminal and :help terminal<tab> will bring a list of other
> help files on aspects.
>
> --
>
> Only wimps use tape backup: _real_ men just upload their important stuff
> on ftp, and let the rest of the world mirror it ;)
> -- Linus Torvalds, about his failing hard drive on linux.cs.helsinki.fi
>
> .--. oo
> (____)//
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
>
> --
> --
> 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.
>

--
--
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 and FORTH-"IDE"-ish environment

In-Reply-To: <20180529164204.r47eyb6yepa2n3j2@solfire>

On Tuesday 29 May 2018 18:42,
tuxic@posteo.de <tuxic@posteo.de> put forth the proposition:
> Hi Jason,
>
> thanks a lot. That's really neat! :)
>
> What's about the other way around: How can get something
> like the serial terminal inside vim?

In vim 8.1 there's the terminal plugin.

See :help terminal and :help terminal<tab> will bring a list of other
help files on aspects.

--

Only wimps use tape backup: _real_ men just upload their important stuff
on ftp, and let the rest of the world mirror it ;)
-- Linus Torvalds, about his failing hard drive on linux.cs.helsinki.fi

.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'

--
--
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 and FORTH-"IDE"-ish environment

Hi Jason,

thanks a lot. That's really neat! :)

What's about the other way around: How can get something
like the serial terminal inside vim?

Thanks a lot in advance!
Cheers!
Meino



On 05/29 12:39, Jason Felice wrote:
> In Vim, it should be as easy as `:w /dev/ttyACM0`, and you could map
> something like so: `nmap <F12> :w /dev/ttyACM0<CR>`.
>
> On Tue, May 29, 2018 at 12:24 PM, <tuxic@posteo.de> wrote:
>
> > Hi,
> >
> > (I am on Linux.)
> >
> > just for fun, entertainment and doing something new, I installed
> > Mecrisp-Stellaris FORTH on a STM32F103C8T6 ( aka "Blue Pill" )
> > micorcontroller board.
> >
> > FORTH is interactive (has a REPL) and is a interpretive
> > (interpretative?) and compiler language at the same time.
> >
> > For ceating new compiled code on the microcontroller is
> > as easy as cat-ting the sourcecode this way:
> >
> > cat sourcecode.fs > /dev/ttyACM0
> >
> > Now you can execute your program via the prompt you get
> > with a serial terminal which is connected via /dev/ttyACM0.
> >
> > But what has all this to do with vim?
> >
> > I want to write code in FORTH with vim (what else? ;), send
> > the code to the microcontroller and - if possible - want to
> > replace the extern console of the serial terminal with something
> > inside vim. I not neccessarily want to avoid the serial terminal --
> > I want to avoid the "external"...the switching between windows.
> >
> > I found some rudimentary attempts of something like that (still
> > in need of an external something), which call 'cat' to transfer
> > the code to the microprocessor.
> > But those posts are from a long time ago.
> >
> > Since vim got tasks and pipes and subprocesses I would like to ask
> > for some keywords or pointers to start with to acchieve what I have
> > described above.
> >
> > Where should I start while trying to read the wheel a second time...?
> > :)
> >
> > Thank you very much in advance for any help!
> > 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.
> >
>
> --
> --
> 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.

--
--
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 and FORTH-"IDE"-ish environment

In Vim, it should be as easy as `:w /dev/ttyACM0`, and you could map something like so: `nmap <F12> :w /dev/ttyACM0<CR>`.

On Tue, May 29, 2018 at 12:24 PM, <tuxic@posteo.de> wrote:
Hi,

(I am on Linux.)

just for fun, entertainment and doing something new, I installed
Mecrisp-Stellaris FORTH on a STM32F103C8T6 ( aka "Blue Pill" )
micorcontroller board.

FORTH is interactive (has a REPL) and is a interpretive
(interpretative?) and compiler language at the same time.

For ceating new compiled code on the microcontroller is
as easy as cat-ting the sourcecode this way:

cat sourcecode.fs > /dev/ttyACM0

Now you can execute your program via the prompt you get
with a serial terminal which is connected via /dev/ttyACM0.

But what has all this to do with vim?

I want to write code in FORTH with vim (what else? ;), send
the code to the microcontroller and - if possible - want to
replace the extern console of the serial terminal with something
inside vim. I not neccessarily want to avoid the serial terminal --
I want to avoid the "external"...the switching between windows.

I found some rudimentary attempts of something like that (still
in need of an external something), which call 'cat' to transfer
the code to the microprocessor.
But those posts are from a long time ago.

Since vim got tasks and pipes and subprocesses I would like to ask
for some keywords or pointers to start with to acchieve what I have
described above.

Where should I start while trying to read the wheel a second time...?
:)

Thank you very much in advance for any help!
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.

--
--
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.

vim and FORTH-"IDE"-ish environment

Hi,

(I am on Linux.)

just for fun, entertainment and doing something new, I installed
Mecrisp-Stellaris FORTH on a STM32F103C8T6 ( aka "Blue Pill" )
micorcontroller board.

FORTH is interactive (has a REPL) and is a interpretive
(interpretative?) and compiler language at the same time.

For ceating new compiled code on the microcontroller is
as easy as cat-ting the sourcecode this way:

cat sourcecode.fs > /dev/ttyACM0

Now you can execute your program via the prompt you get
with a serial terminal which is connected via /dev/ttyACM0.

But what has all this to do with vim?

I want to write code in FORTH with vim (what else? ;), send
the code to the microcontroller and - if possible - want to
replace the extern console of the serial terminal with something
inside vim. I not neccessarily want to avoid the serial terminal --
I want to avoid the "external"...the switching between windows.

I found some rudimentary attempts of something like that (still
in need of an external something), which call 'cat' to transfer
the code to the microprocessor.
But those posts are from a long time ago.

Since vim got tasks and pipes and subprocesses I would like to ask
for some keywords or pointers to start with to acchieve what I have
described above.

Where should I start while trying to read the wheel a second time...?
:)

Thank you very much in advance for any help!
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.

Monday, May 28, 2018

Re: vimdiff exit when files are identical?

On 2018-05-28 18:11, M Kelly wrote:
> Is there a variable for how many diffs are present after starting
> vimdiff ? I'd like to exit immediately with status of 0 if there
> are no differences between the files I pass into vimdiff.

Not that I know of off the top of my head (though if there is, I'd be
glad to stash that new knowledge away), but you can do a quick check
before invocation:

diff -q file1 file2 >/dev/null && echo same || vimdiff file1 file2

which could be wrapped in an alias/function to simplify the
invocation.

-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.

vimdiff exit when files are identical?

Hi,
Is there a variable for how many diffs are present after starting vimdiff ?
I'd like to exit immediately with status of 0 if there are no differences between the files I pass into vimdiff.
thx for any suggestions,
-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: Drag and drop seems not working.

Le lundi 28 mai 2018 19:08:28 UTC+2, Bram Moolenaar a écrit :
> > On Windows 10, drag and drop a file from desktop to gvim 8.1.26 x86 seems to not working.
>
> Works fine for me. Please check your installation.
>
> --
> Bad fashion can discourage normal people from interacting with the engineer
> and talking about the cute things their children do.
> (Scott Adams - The Dilbert principle)
>
> /// 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 ///

Maybe was mismatched files between x86 and x64 own gvim 8.1.26 that caused error.
Because after unzipped my archive it works.

Thank you !

--
--
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.

ANN: digraphs outside of Vim

All,

As my job has changed over the years, I find myself spending less time
using Vim and (alas) more time using Outlook. However, one of my
favourite features of Vim for typing (with Pandoc or whatever) is
simplicity of entering symbols using Ctrl-K and a two-letter
representation of the symbol.

I liked the feature so much that a few years ago I made a little
python program (also available compiled as a Windows executable) to
make those digraphs available in any application. It is only really
for Windows, although the core GUI and digraph code can run anywhere
python/PySide runs.

Anyway, in case this is of interest to other Vim users, I thought I'd
announce it here.

The source code and instructions are available at
https://bitbucket.org/abudden/digraph

The Windows executable is here: https://bitbucket.org/abudden/digraph/downloads/

There is a handy table of the digraphs I use most often here:
https://bitbucket.org/abudden/digraph/raw/tip/digraph_table_landscape.pdf

Al

--
--
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: Drag and drop seems not working.

> On Windows 10, drag and drop a file from desktop to gvim 8.1.26 x86 seems to not working.

Works fine for me. Please check your installation.

--
Bad fashion can discourage normal people from interacting with the engineer
and talking about the cute things their children do.
(Scott Adams - The Dilbert principle)

/// 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.

Drag and drop seems not working.

Hi all,

On Windows 10, drag and drop a file from desktop to gvim 8.1.26 x86 seems to not working.

Thank you in advance.
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.

Friday, May 25, 2018

Re: VIM Advanced text string search HELP

Thank you for all your help, TOM M had the solution

--
--
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 Advanced text string search HELP

Great, i will run some tests now. thanks for your help, i will report back

--
--
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 Advanced text string search HELP

On Friday, May 25, 2018 at 10:21:52 AM UTC+2, Matt Truslove wrote:
> Good morning,
> I have a very important XML file which contains a lot of important metadata. Recently my old computer has become useless so i managed to backup all my data and export all my files.
>
> as part of the backup i exported the metadata via an XML feature. But not realising that the new location would be different for all the files once moved.
>
> the XML file has a tag for Location and i need this to change whilst retaining the file name.
>
> i was told VIM is perfect for this. so fired fired up my old linux box to give it a go but no avail.
>
> please see the below example
>
> <key>Location</key><string>file:///Volumes/OLDDRIVE/OTHERFOLDER/aaaaa/bbbbb/ccccc/ddddd/eeeee/20Berksonax.uue</string>
>
> i want to find and replace the text between the "file:///" and the last but one "/" (as the last slash will affect the XML </string>.) but retain the file name, extension and end tag </string>
>
> to end up with
>
>
> <key>Location</key><string>file:///NewVolume/NEW_SSD/NEWFOLDER2018/0Berksonax.uue</string>

Hello,

how about this substitution?

%s#\(<key>Location</key><string>file://\)/\(Volumes\)/\(OLDDRIVE\)/\(OTHERFOLDER\)/.*/\(.*\)\(</string>\)#\1/NewVolume/NEW_SSD/NEWFOLDER2018/\5\6#

First try on one line (without the '%') to see if the result is precisely what you need.

Tom

--
--
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 Advanced text string search HELP

It may help if you can start vim in non-compatible mode, such as with

vi -N

I suggest also turning on search highlighting:

:set hlsearch

If the path you want to replace does not have any dots, I would first search for the text that needs to be replaced, perhaps

/\/\/\/[^.]\+\/

With search highlighting, you can see what's been matched. When you're happy with it,

:%s##///new/path/to/file/

(Note the # above is an arbitrary choice, usually one uses / but that's messy here.)

--
--
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 Advanced text string search HELP

Thank you for the resources, but all i have at the moment is a linux terminal and my work machine, so resources and software is limited

--
--
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 Advanced text string search HELP

Hi Matt,

On Fri, 25 May 2018 01:16:54 -0700 (PDT)
Matt Truslove <m81tlove@gmail.com> wrote:

> Good morning,
> I have a very important XML file which contains a lot of important metadata.
> Recently my old computer has become useless so i managed to backup all my
> data and export all my files.
>
> as part of the backup i exported the metadata via an XML feature. But not
> realising that the new location would be different for all the files once
> moved.
>

see http://perl-begin.org/uses/text-parsing/ and
http://perl-begin.org/uses/xml/ and equivalents for other languages. See
https://blog.codinghorror.com/parsing-html-the-cthulhu-way/ .


> the XML file has a tag for Location and i need this to change whilst
> retaining the file name.
>
> i was told VIM is perfect for this. so fired fired up my old linux box to
> give it a go but no avail.
>
> please see the below example
>
> <key>Location</key><string>file:///Volumes/OLDDRIVE/OTHERFOLDER/aaaaa/bbbbb/ccccc/ddddd/eeeee/20Berksonax.uue</string>
>
> i want to find and replace the text between the "file:///" and the last but
> one "/" (as the last slash will affect the XML </string>.) but retain the
> file name, extension and end tag </string>
>
> to end up with
>
>
> <key>Location</key><string>file:///NewVolume/NEW_SSD/NEWFOLDER2018/0Berksonax.uue</string>
>



--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
http://youtu.be/xZLwtc9x4yA - Anime in Real Life!! (Parody)

What's the point of claiming your code is illegal?
I might anger a few, but I just wanna sue
http://www.shlomifish.org/humour/bits/Can-I-SCO-Now/

Please reply to list if it's a mailing list post - http://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.
For more options, visit https://groups.google.com/d/optout.

Re: VIM Advanced text string search HELP

If it were me, I'd put symlinks on the system to match the old path so
that the file doesn't need editing.

I'd also review my backup AND TEST RESTORE process.

--
"The best argument against democracy is a five-minute conversation with
the average voter" - Winston Churchill


--
--
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.

VIM Advanced text string search HELP

Good morning,
I have a very important XML file which contains a lot of important metadata. Recently my old computer has become useless so i managed to backup all my data and export all my files.

as part of the backup i exported the metadata via an XML feature. But not realising that the new location would be different for all the files once moved.

the XML file has a tag for Location and i need this to change whilst retaining the file name.

i was told VIM is perfect for this. so fired fired up my old linux box to give it a go but no avail.

please see the below example

<key>Location</key><string>file:///Volumes/OLDDRIVE/OTHERFOLDER/aaaaa/bbbbb/ccccc/ddddd/eeeee/20Berksonax.uue</string>

i want to find and replace the text between the "file:///" and the last but one "/" (as the last slash will affect the XML </string>.) but retain the file name, extension and end tag </string>

to end up with


<key>Location</key><string>file:///NewVolume/NEW_SSD/NEWFOLDER2018/0Berksonax.uue</string>

--
--
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, May 22, 2018

Re: vim mapping calls xmodmap to swap : with ; in a keyboard with dead keys for accents

resolved!

" aux/PXmodmap created through $ xmodmap -pke > aux/PXmodmap
" with each dead, non-dead keys 'input source'
" (as Unity/Ubuntu 16.04 calls it)
" and swapping colon with semicolon
nn <silent> <space>p; :cal system('xmodmap '.g:prv.paths.vim.'aux/PXmodmap')<cr>
nn <silent> <space>p: :cal system('xmodmap '.g:prv.paths.vim.'aux/PXmodmap2')<cr>
" Notes:
" - can I leave only the chars needed to swap in PXmodmap? e.g. only ; with :?
" - i should make this through the system.

as in:
https://github.com/ttm/prv/blob/master/vimrc



Em sábado, 19 de maio de 2018 23:18:42 UTC-3, Renato Fabbri escreveu:
> mapping;
>
> nn <space>p; :cal system('xmodmap ~/.Xmodmap')
>
> ~/.Xmodmap created with -pke > aux/PXmodmap
> and then swapping colon with semicolon
>
> Ctrl+space swaps dead keys and not dead keys,
> set by OS (ubuntu 16.04).
>
> But....
>
> when swapping dead and no dead keys (c-space),
> ; is ; again, : is : again, and i also have to
> press <space>p; to swap them again.
>
> i want to make them independent,
> i.e. that c-space does not reset swap of ; with :
>
> (understand that this is more an OS then a Vim issue,
> but even so, you might have good solutions or thoughts)
>
> any suggestions?

--
--
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: copy word

On Tue, 22 May 2018 10:22:45 +0200
"sampei02@tiscali.it" <sampei02@tiscali.it> wrote:

> There is way to copy word to buffer and paste it to another place ?
>
>

yes, see
https://stackoverflow.com/questions/7797068/copying-a-word-and-pasting-over-a-word



--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
http://www.shlomifish.org/humour/Summerschool-at-the-NSA/

The more I think about it, the more I think I should think about it some more.
— Clarissa Explains it All

Please reply to list if it's a mailing list post - http://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.
For more options, visit https://groups.google.com/d/optout.

copy word

There is way to copy word to buffer and paste it to another place ?


--
--
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.

Monday, May 21, 2018

Re: vi commands

On 2018-05-11 10:52, sampei02@tiscali.it wrote:
>> One way is to select the lines of code that you need indenting
>> with shift+v and scrolling down, then press >
>
> Do you know if it works for every VIM environment? I don't usually
> install GUI in Linux server.

It works in both console & GUI versions of vim as long as your
output of

:version

includes "+visual".

Some distributions only provide "vim-tiny" (a stripped-down version
with only the barest of features, excluding things like visual mode),
but then provide a regular vim (usually with a name something like
"vim-huge", "vim-gtk", "vim-full") in the package repositories.

-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: vi commands

On 2018-05-21 13:32, sampei02@tiscali.it wrote:
> I tried to select rows by ctrl-v but with '>' key text is indented
> to different space vs tabstop. E.g. my tabstop is set to default as
> 4 value and > indent rows to 8 spaces. how can I tune it?

You'll want to check your 'shiftwidth', 'softtabstop', and
'expandtab' settings.

Most folks recommend leaving 'tabstop' to the default of 8, while
setting shiftwidth & softtabstop to the same value for the
indentation you want (4). Either set expandtab if you prefer spaces,
or set noexpandtab if you want literal tabs when you hit <tab>

-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: vi commands

I tried to select rows by ctrl-v but with '>' key text is indented to different space vs tabstop.
E.g. my tabstop is set to default as 4 value and > indent rows to 8 spaces.
how can I tune it?

> On 6 May 2018, at 23:07, David Woodfall <dave@dawoodfall.net> wrote:
>
> On Sunday 6 May 2018 10:15,
> sampei02@tiscali.it <sampei02@tiscali.it> put forth the proposition:
>> I need to understand if VI can permit these operations:
>
> See :help movement
>
>> 1- to move cursor to next word, does it exist key-bindings to make it?
>> 2- select specific part of text to copy it and to past it to another area inside the same file.
>> 3- to insert tabs for indentation in multiple row, e.g. to move " if " instructions group in C code; I usually follow these steps moving cursor at the beginning of first line: esc' + 'I' , insert tab by press 'tab' key, 'esc' again, press 'j' (next row), esc' + 'I' , 'tab' key, … If I had many rows it will occur much time, is there way to speed up?
>>
>> Thanks
>
> One way is to select the lines of code that you need indenting with
> shift+v and scrolling down, then press >
>
> -Dave
>
> --
> --
> 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.

--
--
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, May 20, 2018

Re: Who maintains cobol.vim?

On Sunday, May 20, 2018 at 7:19:28 PM UTC+12, Martin Lindkvist wrote:
> Could you please pint me to the correct place to get this vim files ....
> I have found them at various places but it would be nice to know that the one i use is the most resent and best working one

(A blast from the past... I haven't had the slightest thought about cobol for a long time.)
In your vim, look in

:edit $VIMRUNTIME/syntax/cobol.vim

The latest has:
" Last Change: 2015 Feb 13

To answer your question, vim is on github:

https://github.com/vim/vim/blob/master/runtime/syntax/cobol.vim

That says the file was changed on 1 September 2016; I suspect that was a vim facing change, rather than to do with cobol.

However, taking files individually may not be a good idea; if you can cope with an 80 MiB download following the instructions at https://www.vim.org/git.php could be better.

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.

Re: Who maintains cobol.vim?

Hello there...
Could you please pint me to the correct place to get this vim files ....
I have found them at various places but it would be nice to know that the one i use is the most resent and best working one


Best Regards
Martin Lindkvist

--
--
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, May 19, 2018

vim mapping calls xmodmap to swap : with ; in a keyboard with dead keys for accents

mapping;

nn <space>p; :cal system('xmodmap ~/.Xmodmap')

~/.Xmodmap created with -pke > aux/PXmodmap
and then swapping colon with semicolon

Ctrl+space swaps dead keys and not dead keys,
set by OS (ubuntu 16.04).

But....

when swapping dead and no dead keys (c-space),
; is ; again, : is : again, and i also have to
press <space>p; to swap them again.

i want to make them independent,
i.e. that c-space does not reset swap of ; with :

(understand that this is more an OS then a Vim issue,
but even so, you might have good solutions or thoughts)

any suggestions?

--
--
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, May 18, 2018

Re: Vim 8.1 is released!

On Fri, May 18, 2018 at 8:51 AM, Christian Brabandt <cblists@256bit.org> wrote:
>
> On Do, 17 Mai 2018, Bram Moolenaar wrote:
>
>> Announcing: Vim (Vi IMproved) version 8.1
>
> Congratulation.
>
> Best,
> Christian

After moving, my phone & Internet line had been kept for a few days at
my old address. When getting back online (for Internet at least, and
AFAICT for incoming but not outgoing phone calls) I find Vim is now at
version/patchlevel 8.1.1. This is the best surprise (so far) I've had
to celebrate the move. Thanks Bram, congratulations, and long live to
Vim!

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: My vim is not working properly

On Thu, 17 May 2018 04:46:58 -0700 (PDT)
srlhyo <srlhyo@gmail.com> wrote:

> Hi all,
>
> I am really sorry to be so vague and uninterested but I am getting anxious
> about not being able to use vim as wished. I have got windows and downloaded
> Vim 8.0 but I am unable to run some plugins, such as "browserlink". For
> instance, if I run :py print(1) it gives the following error: E887: Sorry,
> this command is disabled, the Python's site module could not be loaded.
>
> I have even downloaded Python 3.6.5 but I still get the same error. My
> question is: is there any way of installing vim free of these problems? I
> really want to be able to use vim but it's been hard to do it so.
>
> Many thanks
>

Hi,

have you tried the advice in
https://stackoverflow.com/questions/4718122/how-to-enable-python-support-in-gvim-on-windows ?

--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
My Aphorisms - http://www.shlomifish.org/humour.html

Thank God I found the good in goodbye!
— "Best Thing I Never Had", Beyoncé

Please reply to list if it's a mailing list post - http://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.
For more options, visit https://groups.google.com/d/optout.

Thursday, May 17, 2018

Re: gf normal command to jump to specific line in file?

On Do, 17 Mai 2018, Renato Fabbri wrote:

> i remembered to have seen it in the manual.
>
> how would you find it?

If you know about gf I would start looking there and indeed gF is
mentioned a couple of paragraphs below.

Best,
Christian
--
Freiwillige Abhängigkeit ist der schönste Zustand, und wie wäre der
möglich ohne Liebe?
-- Johann Wolfgang von Goethe (Wahlverwandtschaften II)

--
--
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 8.1 is released!

On Do, 17 Mai 2018, Bram Moolenaar wrote:

> Announcing: Vim (Vi IMproved) version 8.1

Congratulation.

Best,
Christian
--
Das Leben ist bezaubernd, man muß es nur durch die richtige Brille
sehen.
Frauen inspirieren uns zu großen Dingen - und hinden uns dann, sie
auszuführen.
-- Alexandre Dumas d.J.

--
--
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.