Tuesday, May 31, 2016

set ruler reset on screen split

Hi,
I (vertically) split a file in two widows and the ruler output vanished.
It happens also with horizontal split, and with other file types.
The docs say this happens on :set paste but not on :split.
I use line numbers a lot to sync editor and browser position of js files.
Any chances to get it back?
Thanks!
--
Juan Lanus
(anyway, vim is the best, most usable, editor on earth.)

It's [g]vim 7.4.52 running under Ubuntu 14LTS
The option is set in .vim/vimrc

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

test

test
test test
test test test
test test test test

--
--
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: sample .vimrc for text use.

On 28 May 2016 at 16:41, John Culleton <John@wexfordpress.com> wrote:
> I set up my .vimrc many years ago. recently my
> computer died and my .vimrc went with it. I use
> vim for creating text documents. It would save me
> many hours of cut and try if someone could
> recommend or send me a .vimrc or .gvimrc set up
> for left justified text with paragraphs separated
> by a blank line. I also had an F key function
> that would rejustify all the paragraphs of the
> document where I had added or deleted text. Does
> that ring a bell with anyone?
>
> Thus far all I have is the line:
> set textwidth = 72
> and that took some hours of research in my copy
> in the Oualine book (2001 version.)

I'll echo raju's comment about keeping vimrc under version control,
but from your description I imagine that the 'F' key was mapped as:

map F gggqG

:help gg
:help gq
:help G

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.

Monday, May 30, 2016

Re: subscripts and superscripts

Hi,

kamaraju kusumanchi schrieb am 31.05.2016 um 06:46:
> For normal editing purposes, I use vim and it works great. But once in
> a while, I want to use subscripts and superscripts. For example, while
> writing chemical equations I would like to see O with a subscript 2 to
> represent the Oxygen molecule. Without using heavy weight stuff such
> as Latex, could I somehow make vim/gvim show subscripts and
> superscripts?

Unicode contains subscript and superscript digits. With 'encoding' set
to UTF-8 and an appropriate font you can enter them via Vim's digraph
capabilities. Just press <Ctrl-K>s1 ... <Ctrl-K>s9 for subscript digits
and <Ctrl-K>S1 ... <Ctrl-K>S9 for superscript letters while in insert
mode.

Regards,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

--
--
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: subscripts and superscripts

* kamaraju kusumanchi <raju.mailinglists@gmail.com> [160531 06:46]:
> Without using heavy weight stuff such as Latex, could I somehow make
> vim/gvim show subscripts and superscripts?
For single digits and using UTF-8 encoding, this is possible with vim's
digraphs. In insert mode, press
CTRL-K, then the digit, then S (cap S) → ⁰¹²...⁹ for superscripts, or
CTRL-K, then the digit, then s (small s) → ₀₁₂...₉ for subscripts.

Btw., for chemical reactions you might try these nice arrows:
← → ↔ with CTRL-K <- and -> and <>

Use :help digraph or simply :digraphs for more.

Greetings,
mo

--
Markus Osterhoff
http://sci.photos

--
--
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: sample .vimrc for text use.

On Sat, May 28, 2016 at 11:41 AM, John Culleton <John@wexfordpress.com> wrote:
> I set up my .vimrc many years ago. recently my
> computer died and my .vimrc went with it.

Sorry, I cannot help much with the formmatting question. But two suggestions.

1) Consider setting up a repository in places like gitlab to store
your custom configuration files. For example, I store all my dotfiles
in https://gitlab.com/d3k2mk7/dotfiles/ and you can see my vimrc at
https://gitlab.com/d3k2mk7/dotfiles/blob/master/vim/vimrc . You can
use gitlab or github or any other repository hosting service. While
both gitlab and github offer free public repositories, the advantage
of gitlab is that it offers free private repositories.

2) Make backups

raju
--
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

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

subscripts and superscripts

For normal editing purposes, I use vim and it works great. But once in
a while, I want to use subscripts and superscripts. For example, while
writing chemical equations I would like to see O with a subscript 2 to
represent the Oxygen molecule. Without using heavy weight stuff such
as Latex, could I somehow make vim/gvim show subscripts and
superscripts?

thanks
raju
--
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

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

asm file syntax highlighting

hi, I am working with some gas asm program and I have some problem with
the syntax highlighting.
I find a bug, and fix it like this in my .vimrc:

autocmd FileType asm syn match asmInclude "#include.*"
autocmd FileType asm hi def link asmInclude Include

This make vim highlight the "#include" part(gas allow including files).
Actually I don't know whether this is a bug or just a feature and
whether I should post a "patch" or something ?


But I still cannot fix another bug: it cannot highlight gas macro
properly. For example, a line like this cannot be highlighted properly:

SEG_ASM(STA_X|STA_R, 0x0, 0xffffffff)

The part after the '|' cannot be highlighted. In this line, "SEG_ASM",
"STA_X" and "STA_R" are all macro.
However,If I write something like this, the syntax highlighting work
pretty well.

SEG_ASM(STA_X, 0x0, 0xffffffff)

I can't find the line in asm.vim under /usr/share/vim/vim74/syntax which
handle this job. Can anyone help ?

Regards,
Ruan

--
--
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 28, 2016

Re: sample .vimrc for text use.

On Sunday, May 29, 2016 at 1:42:00 AM UTC+10, wexfordpress wrote:
> I set up my .vimrc many years ago. recently my
> computer died and my .vimrc went with it.

http://vim.wikia.com/wiki/Example_vimrc

John

--
--
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: sample .vimrc for text use -> :opt + #vim channel

On Sat, 28 May 2016 18:11:49 +0200
Sven Guckes <guckes@guckes.net> wrote:

> * John Culleton <John@wexfordpress.com>
> [2016-05-28 17:53]:
> > I set up my .vimrc many years ago. recently
> > my computer died and my .vimrc went with it.
> > I use vim for creating text documents. It
> > would save me many hours of cut and try if
> > someone could recommend or send me a .vimrc
> > or .gvimrc set up for left justified text
> > with paragraphs separated by a blank line.
>
> well - paragraphs are *defined* as block of
> non-empty lines separated by the *empty* lines
> around them. no need for any setup here.
>
> > I also had an F key function that would
> > rejustify all the paragraphs of the document
> > where I had added or deleted text.
> > Does that ring a bell with anyone?
>
> this one rejustifies the current paragraph:
>
> map <f1> gqip
>
> this one rejustifies all text:
>
> map <f2> 1GVGgq
>
> > Thus far all I have is the line:
> > set textwidth = 72
> > and that took some hours of research in my
> > copy in the Oualine book (2001 version.)
>
> well, book dont rearrange themselves
> to what you are sarching for. ;)
>
> how about this one:
> http://www.guckes.net/Setup/vimrc.minimal
>
> explanation:
> http://www.guckes.net/vim/setup.html
>
> take a look at ":set" for what is really
> changed. and then there is this great command
> ":options" which creates a HUGE setup file with
> everything. :)
>
> back up your setup. put it online.
> you might find a backup in google.. ;)
> https://www.google.de/search?q=sven.guckes+vimrc
> whee - 2100 hits \o/ however, on page #11 is
> says: "In order to show you the most relevant
> results, we have omitted some entries very
> similar to the 102 already displayed" - ah,
> well..
>
> you might also want to ask interactively
> on IRC on channel #vim. there are usually
> over 1000 clients/nicks connected to that
> channel.
>
> here is how: http://webchat.freenode.net/
> choose a nickname, choose "#vim" as the channel,
> you might want to "auth" to services,
> and check that "i'm not a robot" box -
> and then you (click on) "connect".
>
> as the channel topic says:
> "Don't ask to ask!
> | Use :help and :helpgrep
> | WIKI: http://vim.wikia.com
> | PASTE: http://vpaste.net/?ft=vim
>
> good luck in recreating your setup file! :)
>
> Sven
>

Exactly what I was looking for. Thanks to all who
responded.

--
--
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: sample .vimrc for text use -> :opt + #vim channel

* John Culleton <John@wexfordpress.com> [2016-05-28 17:53]:
> I set up my .vimrc many years ago. recently my computer died and
> my .vimrc went with it. I use vim for creating text documents.
> It would save me many hours of cut and try if someone could
> recommend or send me a .vimrc or .gvimrc set up for left
> justified text with paragraphs separated by a blank line.

well - paragraphs are *defined* as block of
non-empty lines separated by the *empty* lines
around them. no need for any setup here.

> I also had an F key function that would
> rejustify all the paragraphs of the document
> where I had added or deleted text.
> Does that ring a bell with anyone?

this one rejustifies the current paragraph:

map <f1> gqip

this one rejustifies all text:

map <f2> 1GVGgq

> Thus far all I have is the line:
> set textwidth = 72
> and that took some hours of research in my
> copy in the Oualine book (2001 version.)

well, book dont rearrange themselves
to what you are sarching for. ;)

how about this one:
http://www.guckes.net/Setup/vimrc.minimal

explanation:
http://www.guckes.net/vim/setup.html

take a look at ":set" for what is really changed.
and then there is this great command ":options"
which creates a HUGE setup file with everything. :)

back up your setup. put it online.
you might find a backup in google.. ;)
https://www.google.de/search?q=sven.guckes+vimrc
whee - 2100 hits \o/ however, on page #11 is says:
"In order to show you the most relevant results,
we have omitted some entries very similar
to the 102 already displayed" - ah, well..

you might also want to ask interactively
on IRC on channel #vim. there are usually
over 1000 clients/nicks connected to that channel.

here is how: http://webchat.freenode.net/
choose a nickname, choose "#vim" as the channel,
you might want to "auth" to services,
and check that "i'm not a robot" box -
and then you (click on) "connect".

as the channel topic says:
"Don't ask to ask!
| Use :help and :helpgrep
| WIKI: http://vim.wikia.com
| PASTE: http://vpaste.net/?ft=vim

good luck in recreating your setup file! :)

Sven

--
http://www.guckes.net/Setup/vimrc
http://www.guckes.net/Setup/vimrc.forall
http://www.guckes.net/Setup/vimrc.mine
.
"Vi IMproved -- Vim"
http://vim.sourceforge.net/docs.php
by Steve Oualline vim-book(at)mail.oualline.com
ISBN: 0735710015 (New Riders, April 2001)
http://www.newriders.com/books/opl/ebooks/0735710015.html
http://www.truth.sk/vim/vimbook-OPL.pdf

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

sample .vimrc for text use.

I set up my .vimrc many years ago. recently my
computer died and my .vimrc went with it. I use
vim for creating text documents. It would save me
many hours of cut and try if someone could
recommend or send me a .vimrc or .gvimrc set up
for left justified text with paragraphs separated
by a blank line. I also had an F key function
that would rejustify all the paragraphs of the
document where I had added or deleted text. Does
that ring a bell with anyone?

Thus far all I have is the line:
set textwidth = 72
and that took some hours of research in my copy
in the Oualine book (2001 version.)

--
--
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 27, 2016

Re: distribute my unicode plugin with vim?

On Sa, 21 Mai 2016, BPJ wrote:

> fredag 20 maj 2016 skrev Christian Brabandt <cblists@256bit.org>:
>
> > Hi,
> > as some of you may know, I am maintaining a little unicode plugin
> > https://github.com/chrisbra/unicode.vim
> >
> > Now I got an issue, that asks if it would be possible to distribute this
> > plugin with Vim, so I am asking here for feedback. Would such a plugin
> > or package be considered generally useful to be distributed with Vim or
> > should I continue to maintain it as separate plugin?
> >
> > Feedback is welcome.
> >
>
> I for one use your Unicode plugin constantly. Mostly the UnicodeName
> command, but also Unicode completion. I might have discovered the plugin
> sooner if it had been distributed with Vim, but there is no guarantee as it
> took me some time to discover those plugins which are distributed with Vim.
> However I think that the Unicode plugin deserves to be discovered and used
> by everyone who does multilingual text entry in Vim (I sure hope I'm not
> one of a very few! :-) For ordinary typing I prefer keymaps, but the plugin
> is very useful for writing keymaps too! One functionality which i miss or
> haven't found is the ability to define digraphs by hex number or Unicode
> name for the cases when I need to define a digraph on the fly for
> occasional use in a document. A while back you (Christian) showed a trick
> to define a digraph by hex number in a mail to this list. I immediately
> turned it into a command, and I think such a command would be a valuable
> addition to the Unicode plugin.

Thanks for the feedback. I just updated your issue on the plugin list.

Waiting for Brams opinion, whether he thinks it could be distributed
together with Vim.

Best,
Christian
--
Vom Verdienste fordert man Bescheidenheit; aber diejenigen, die
unbescheiden das Verdienst schmälern, werden mit Behagen angehört.
-- Goethe, Maximen und Reflektionen, Nr. 665

--
--
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: distribute my unicode plugin with vim?

Hi Enno!

On Fr, 20 Mai 2016, Enno wrote:

> Le vendredi 20 mai 2016 14:08:12 UTC+2, Christian Brabandt a écrit :
> > Hi, as some of you may know, I am maintaining a little unicode
> > plugin https://github.com/chrisbra/unicode.vim
> >
> > Now I got an issue, that asks if it would be possible to distribute
> > this plugin with Vim, so I am asking here for feedback. Would such a
> > plugin or package be considered generally useful to be distributed
> > with Vim or should I continue to maintain it as separate plugin?
> >
> > Feedback is welcome.
> >
> > Here is the description of the plugin, taken from
> > https://github.com/chrisbra/unicode.vim/blob/master/README.md which
> > also contains a little screencast:
> >
> > This plugin aims to make the handling of unicode and digraphs chars
> > in Vim easier. It serves 3 purposes:
> >
> > Complete Characters Identify Characters Ease the use of Digraphs
> >
> > Complete Characters
> >
> > A custom completion function is available to complete characters
> > using their Unicode name or Codepoint. If a digraph exists for that
> > character, it will be displayed in paranthesis. Press Ctrl-X Ctrl-Z
> > to trigger this completion from insert mode. Also a new custom
> > completion for digraph chars is available. Press Ctrl-X Ctrl-G to
> > trigger this completion. It will display all digraphs, that are
> > reachable from the previous typed letter.
> >
> > Identify Characters
> >
> > The :UnicodeName command can be used to identify the character under
> > the cursor. This works similar to the builtin ga command (in fact,
> > the help also states a possibility to map this command to the ga
> > builtin command), but it also displays the digraph character (if it
> > exists) and the HTML entity.
> >
> > The :SearchUnicode command can be used to search in the unicode
> > character table to search for a certain unicode character with a
> > given name or value.
> >
> > The :UnicodeTable can be used to generate an Unicode table,
> > including HTML entity names and Digraph chars. The UnicodeTable will
> > be nicely syntax highlighted.
> >
> > Ease the use of Digraphs
> >
> > Use the :Digraphs command to search for an digraph with the given
> > name (e.g. :Digraphs copy will display all digraphs that will create
> > a character name which contains copy in its name). You can also
> > search for the decimal value. This plugin also maps the key <F4>
> > that will allow to transform 2 given normal chars into their digraph
> > char.
> >
> > See also the following screencast, that shows several features
> > available: screencast of the plugin
> >
> > Installation
> >
> > Use the plugin manager of your choice. Or download the stable
> > version of the plugin, edit it with Vim (vim unicode-XXX.vmb) and
> > simply source it (:so %). Restart and take a look at the help (:h
> > unicode-plugin) Usage
> >
> > Once installed, take a look at the help at :h unicode-plugin
> >
> > Here is a short overview of the functionality provided by the
> > plugin: Ex commands:
> >
> > :Digraphs - Search for specific digraph char :SearchUnicode
> > - Search for specific unicode char :UnicodeName - Identify
> > character under cursor (like ga command) :UnicodeTable - Print
> > Unicode Table in new window :DownloadUnicode - Download (or update)
> > Unicode data
> >
> > Normal mode commands:
> >
> > <C-X><C-G> - Complete Digraph char <C-X><C-Z> - Complete Unicode
> > char <F4> - Combine characters into digraphs
> >
> > Scripting Functions:
> >
> > unicode#FindUnicodeBy() - Find unicode characters
> > unicode#FindDigraphBy() - Find Digraph char unicode#Digraph()
> > - Returns digraph char unicode#UnicodeName() - Identifies unicode
> > character (by value)
> >
> > License & Copyright
> >
> > © 2009-2014 by Christian Brabandt. The Vim License applies. See :h
> > license
> >
> > NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK
> >
> >
> > Best, Christian -- Hoffentlich werden wir so alt wie wir aussehen.
>
> Hello Christian,
>
> the request on GitHub (by me) was specifically about the
> `:UnicodeName` command (and mapping it to `ga`) as a better
> alternative to the built-in `ga`. It could come coupled with
> `:DownloadUnicode` to download the latest Unicode data on demand.

Yeah I suppose that could be useful, although I would have to split and
refactor the existing plugin. I would only do it, once we agree it
should be distributed with Vim.

However, since most functionality builds around new custom commands, it
might make sense to distribute as package so it can be enabled on demand
by users and they can then use whatever they like.

Best,
Christian
--
Frau: Liebling, wo willst du nächstes Jahr Urlaub machen?
Mann: Am liebsten dort, wo ich noch nie war.
Frau: Ja prima, wie wär's dann mit der Küche.

--
--
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 26, 2016

Re: Does :global convert tabs to spaces prior to sending to the screen?

>
> I think this happens by the redir function, which basically gets the
> output from the screen and does not know, that the underlying message
> has been using tabs.
>
In an earlier post I had not done enough testing the new split window from
:OutputSplitWindow does not properly retain tabs. Now I really need to learn vimscript.

--Rod.

--
--
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: Profiling startup of vim : Sourcing two same

On Thursday, May 26, 2016 at 10:07:59 AM UTC-5, Ni Va wrote:
> Hi,
>
> By checking my startup of gvim, i notice that some plugin like solarized is loaded two times.
>
> I don't understand why, someone can explain to me that thing ?
> thanks
> niva

For colorscheme files in particular, turning on syntax highlighting with "syntax on" will automatically re-apply your colorscheme, if you've set a colorscheme already.

So probably you applied your colorscheme before turning on syntaxt in your .vimrc. To avoid this you may be able to put your colorscheme command after "syntax on". But I'm not 100% clear on the complexities involved.

There may be different reasons for others of the duplicated files.

--
--
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: Does :global convert tabs to spaces prior to sending to the screen?

Hi Rod!

On Do, 26 Mai 2016, Rod Holcomb wrote:

> I have the following function in my .vimrc
>
>
> command! -nargs=+ -complete=command TabMessage call TabMessage(<q-args>)
> function! TabMessage(cmd)
> redir => message
> silent execute a:cmd
> redir END
> tabnew
> silent put=message
> set nomodified
> endfunction
>
>
>
> basically it redirect message to a new tab.
> however when I run
> :TabMessage g//
>
> tabs my buffer get stripped on there way to the new tab.
>
> Thoughts?

I think this happens by the redir function, which basically gets the
output from the screen and does not know, that the underlying message
has been using tabs.


Best,
Christian
--
Wer wünscht, daß man ihn fürchte, erreicht nur, daß man ihn haßt.
-- Charles-Louis de Montesquieu

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

Does :global convert tabs to spaces prior to sending to the screen?

I have the following function in my .vimrc


command! -nargs=+ -complete=command TabMessage call TabMessage(<q-args>)
function! TabMessage(cmd)
redir => message
silent execute a:cmd
redir END
tabnew
silent put=message
set nomodified
endfunction



basically it redirect message to a new tab.
however when I run
:TabMessage g//

tabs my buffer get stripped on there way to the new tab.

Thoughts?

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.

Profiling startup of vim : Sourcing two same



times in msec
clock self+sourced self: sourced script
clock elapsed: other lines

000.000 000.000: --- VIM STARTING ---
000.000 000.000: Allocated generic buffers
001.000 001.000: locale set
003.000 002.000: GUI prepared
003.000 000.000: clipboard setup
003.000 000.000: window checked
004.000 001.000: inits 1
005.000 001.000: parsing arguments
005.000 000.000: expanding arguments
006.000 001.000: shell init
006.000 000.000: inits 2
006.000 000.000: init highlight
011.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\syncolor.vim
012.000 002.000 002.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\synload.vim
029.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\ftdetect\awl.vim
029.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\ftdetect\ldf.vim
030.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\ftdetect\log.vim
031.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\ftdetect\logconfedit.vim
031.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\ftdetect\py.vim
032.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\ftdetect\sqllog.vim
032.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\ftdetect\vat.vim
036.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\lang/menu_fr_fr.latin1.vim
036.000 002.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\lang\menu_fr.latin1.vim
037.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\autoload\paste.vim
050.000 017.000 015.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74/menu.vim
050.000 038.000 021.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\filetype.vim
050.000 041.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\syntax.vim
1157.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax/nosyntax.vim
1158.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\syncolor.vim
1159.000 002.000 002.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\synload.vim
1159.000 003.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\syntax.vim
1160.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\syncolor.vim
1163.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\syncolor.vim
1165.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\syncolor.vim
1168.000 007.000 006.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-colors-solarized-master\colors\solarized.vim
1169.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\filetype.vim
1170.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\ftplugin.vim
1171.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\indent.vim
1173.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax/nosyntax.vim
1176.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\syncolor.vim
1178.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\syncolor.vim
1181.000 006.000 006.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-colors-solarized-master\colors\solarized.vim
1181.000 008.000 002.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\synload.vim
1181.000 009.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\syntax\syntax.vim
1182.000 1174.000 1114.000: sourcing $VIM\_vimrc
1182.000 002.000: sourcing vimrc file(s)
1185.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\base64.vim
1187.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\DirDiff.vim
1188.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\dispatch.vim
1188.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\findstr.vim
1192.000 003.000 003.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\mru.vim
1195.000 003.000 003.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\opcNiva.vim
1197.000 002.000 002.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\fi.vim
1199.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\PsExec.vim
1200.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\surround.vim
1207.000 006.000 006.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\taglist.vim
1211.000 003.000 003.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\tcomment.vim
1214.000 003.000 003.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\unimpaired.vim
1216.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\autoload\unite\custom.vim
1216.000 002.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\unite\bookmark.vim
1216.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\unite\buffer.vim
1217.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\unite\history_yank.vim
1218.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\unite\window.vim
1219.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\unite.vim
1221.000 002.000 002.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\utilsNiva.vim
1222.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\utilsNivarama.vim
1223.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\utilsNivaScheduleTasks.vim
1224.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\utilsS7.vim
1225.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vimfiles\plugin\vimfiler.vim
1226.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\plugin\getscriptPlugin.vim
1227.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\plugin\gzip.vim
1228.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\plugin\matchparen.vim
1229.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\plugin\netrwPlugin.vim
1230.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\plugin\rrhelper.vim
1231.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\plugin\spellfile.vim
1231.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\plugin\tarPlugin.vim
1232.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\plugin\tohtml.vim
1233.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\plugin\vimballPlugin.vim
1234.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\vim74\plugin\zipPlugin.vim
1236.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\ctrlp.vim-master\autoload\ctrlp\mrufiles.vim
1236.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\ctrlp.vim-master\plugin\ctrlp.vim
1260.000 023.000 023.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\Execute-selection-in-Python-and-append-master\plugin\pythonExecuteAppendOrReplace.vim
1262.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\L9-master\autoload\l9.vim
1266.000 002.000 002.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf.vim
1267.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\buffer.vim
1268.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\file.vim
1270.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\coveragefile.vim
1271.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\dir.vim
1274.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\bookmarkfile.vim
1275.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\bookmarkdir.vim
1277.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\tag.vim
1279.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\buffertag.vim
1281.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\taggedfile.vim
1283.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\jumplist.vim
1285.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\changelist.vim
1286.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\quickfix.vim
1288.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\line.vim
1289.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\help.vim
1291.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\givenfile.vim
1292.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\givendir.vim
1293.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\givencmd.vim
1295.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\callbackfile.vim
1296.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\autoload\fuf\callbackitem.vim
1296.000 035.000 027.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\FuzzyFinder-master\plugin\fuf.vim
1297.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\L9-master\plugin\l9.vim
1298.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\limelight.vim-master\plugin\limelight.vim
1300.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\matchit.zip-master\plugin\matchit.vim
1303.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\autoload\nerdtree.vim
1305.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\path.vim
1307.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\menu_controller.vim
1308.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\menu_item.vim
1309.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\key_map.vim
1311.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\bookmark.vim
1312.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\tree_file_node.vim
1314.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\tree_dir_node.vim
1315.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\opener.vim
1317.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\creator.vim
1318.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\flag_set.vim
1320.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\nerdtree.vim
1321.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\ui.vim
1322.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\event.vim
1324.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\lib\nerdtree\notifier.vim
1325.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\autoload\nerdtree\ui_glue.vim
1342.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\nerdtree_plugin\exec_menuitem.vim
1343.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\nerdtree_plugin\fs_menu.vim
1344.000 043.000 039.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\nerdtree-master\plugin\NERD_tree.vim
1394.000 049.000 049.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\omnisharp-vim-master\plugin\OmniSharp.vim
1395.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\tabular-master\plugin\Tabular.vim
1397.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\unite.vim-master\plugin\unite\bookmark.vim
1398.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\unite.vim-master\plugin\unite\buffer.vim
1399.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\unite.vim-master\plugin\unite\history_yank.vim
1399.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\unite.vim-master\plugin\unite\window.vim
1400.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\unite.vim-master\plugin\unite.vim
1403.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline.vim
1404.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\init.vim
1406.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\parts.vim
1407.000 006.000 005.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\plugin\airline.vim
1408.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-expresso\plugin\expresso.vim
1413.000 004.000 004.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-fugitive-master\plugin\fugitive.vim
1415.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-interestingwords-master\plugin\interestingwords.vim
1416.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-multiple-cursors-master\plugin\multiple_cursors.vim
1417.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vimfiler.vim-master\plugin\vimfiler.vim
1417.000 040.000: loading plugins
1418.000 001.000: loading packages
1418.000 000.000: inits 3
1419.000 001.000 001.000: sourcing $VIMRUNTIME\menu.vim
1451.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions.vim
1452.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\quickfix.vim
1453.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\unite.vim
1455.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\netrw.vim
1457.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\ctrlp.vim
1458.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\branch.vim
1460.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\whitespace.vim
1461.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\wordcount.vim
1463.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\tabline.vim
1464.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\tabline\autoshow.vim
1465.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\tabline\tabs.vim
1467.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\tabline\buffers.vim
1468.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\tabline\ctrlspace.vim
1474.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\section.vim
1476.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\highlighter.vim
1480.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\themes.vim
1480.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\themes\dark.vim
1492.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\util.vim
1497.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\builder.vim
1499.000 000.000 000.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\default.vim
1608.000 182.000: starting GUI
1609.000 001.000: reading viminfo
1611.000 002.000: GUI delay
1611.000 000.000: setting raw mode
1611.000 000.000: start termcap
1611.000 000.000: clearing screen
1617.000 006.000: opening buffers
1617.000 000.000: BufEnter autocommands
1617.000 000.000: editing files in windows
1624.000 007.000: VimEnter autocommands
1624.000 000.000: before starting main loop
1627.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\tabline\buflist.vim
1629.000 001.000 001.000: sourcing D:\Travail\Niva\VimStandalone\Vim\awesomeplugins\vim\vim-airline-master\autoload\airline\extensions\tabline\formatters\default.vim
1631.000 005.000: first screen update
1631.000 000.000: --- VIM STARTED ---
Hi,

By checking my startup of gvim, i notice that some plugin like solarized is loaded two times.

I don't understand why, someone can explain to me that thing ?
thanks
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: How to clear screen before running a shell command after bang(!) in freebsd

在 2016年5月26日星期四 UTC+8下午5:44:51,Christian Brabandt写道:
> Hi skywind3000!
>
> On Mi, 25 Mai 2016, skywind3000 wrote:
>
> > Starting working in freebsd, I notice the experience of shell command (!) is quite different in linux.
> >
> > for example, ":!python %" in linux will clear the screen first and show the output of previous command and after
> > executing finished it returns to vim
> >
> > but, ":!python %" in freebsd will scroll vim screen up and output directly below vim gui without
> > clear the screen and show the previous output.
> >
> > Someone in stackoverflow said ":!clear; xxx" could be useful if I want to clear the screen in freebsd,
> > but it still can't show me the previous command output.
> > (http://stackoverflow.com/questions/6885792/clear-screen-before-bang )
> >
> > Is there an option or building config for me to change the bang(!) experience in freebsd to linux version ?
>
> Sounds like in freebsd your vim is not switching screens. Please read
> `:h xterm-screens` it explains the problem and how to configure your vim
> for it.
>
>
> Best,
> Christian
> --
> Der religiöse Mensch liebt es, für sein Brauchtum zu kämpfen, aber er
> haßt es, nach dessen ursprünglichen Sinngehalt zu leben.
> -- Henning Venske

Thanks very much , very useful reply.
problem is solved by setting t_ti/t_te in .vimrc

--
--
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 clear screen before running a shell command after bang(!) in freebsd

Hi skywind3000!

On Mi, 25 Mai 2016, skywind3000 wrote:

> Starting working in freebsd, I notice the experience of shell command (!) is quite different in linux.
>
> for example, ":!python %" in linux will clear the screen first and show the output of previous command and after
> executing finished it returns to vim
>
> but, ":!python %" in freebsd will scroll vim screen up and output directly below vim gui without
> clear the screen and show the previous output.
>
> Someone in stackoverflow said ":!clear; xxx" could be useful if I want to clear the screen in freebsd,
> but it still can't show me the previous command output.
> (http://stackoverflow.com/questions/6885792/clear-screen-before-bang )
>
> Is there an option or building config for me to change the bang(!) experience in freebsd to linux version ?

Sounds like in freebsd your vim is not switching screens. Please read
`:h xterm-screens` it explains the problem and how to configure your vim
for it.


Best,
Christian
--
Der religiöse Mensch liebt es, für sein Brauchtum zu kämpfen, aber er
haßt es, nach dessen ursprünglichen Sinngehalt zu leben.
-- Henning Venske

--
--
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: Channel commands: special characters, quotes and escaping

On Thursday, May 26, 2016 at 12:43:21 AM UTC+2, ZyX wrote:
> Most of time JSON is not written "by hand", it is created by some
> library functions. E.g. Python has `json` standard (almost always
> installed with the interpreter itself) module, VimL has built-in
> `json_encode`, etc: many modern languages have this either "built-in"
> or "in standard library", exceptions are usually positioning
> themselves as "system" (like Rust or C) or "light-weight" (like lua)
> languages. These functions would not create invalid JSON, they accept
> native data types and they may be optimized, so 99% of time it is
> better to use them even if you are absolutely sure you can write valid
> JSON by hand.
Thanks for that. For writing services/plugins/whatever I would, of course, rely on those libraries. I simply didn't have the need to do so in the past. That's why my knowledge about JSON is rather limited.

Right now, I have a particular use case - I'm playing with the new functions for a review of the upcoming version. So, I was looking for a simple example to be put in the article. Basically, I'm satisfied with telling the readers the default handler expects JSON.

--
--
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 25, 2016

How to clear screen before running a shell command after bang(!) in freebsd

Starting working in freebsd, I notice the experience of shell command (!) is quite different in linux.

for example, ":!python %" in linux will clear the screen first and show the output of previous command and after
executing finished it returns to vim

but, ":!python %" in freebsd will scroll vim screen up and output directly below vim gui without
clear the screen and show the previous output.

Someone in stackoverflow said ":!clear; xxx" could be useful if I want to clear the screen in freebsd,
but it still can't show me the previous command output.
(http://stackoverflow.com/questions/6885792/clear-screen-before-bang )

Is there an option or building config for me to change the bang(!) experience in freebsd to linux version ?

--
--
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: Channel commands: special characters, quotes and escaping

2016-05-25 16:35 GMT+03:00 'Jan Bundesmann' via vim_use
<vim_use@googlegroups.com>:
>> JSON has no single quoted literal
>> strings, so your example *must* fail because it is not a valid JSON.
>
> I think, this is the answer.
>
> Maybe learning first how to write valid JSON is a good idea when playing around with channels. :-p

Most of time JSON is not written "by hand", it is created by some
library functions. E.g. Python has `json` standard (almost always
installed with the interpreter itself) module, VimL has built-in
`json_encode`, etc: many modern languages have this either "built-in"
or "in standard library", exceptions are usually positioning
themselves as "system" (like Rust or C) or "light-weight" (like lua)
languages. These functions would not create invalid JSON, they accept
native data types and they may be optimized, so 99% of time it is
better to use them even if you are absolutely sure you can write valid
JSON by hand.

>
> Thanks
> Jan
>
> --
> --
> 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: Channel commands: special characters, quotes and escaping

Jan Bundesmann wrote:

> > I think this should also work:
> >
> > ["ex", 'call feedkeys("ggOHello, world!\\e")']
> Nope, it does not. Channel log says:
> 82.925983 RECV on 0: '["ex", 'call feedkeys("ggOHello, world!\\e")']'
> 82.926009 ERR on 0: Decoding failed - discarding input

Oh wait, this is JSON and JSON only accepts double quoted strings.

> > Keep in mind this is in Python. And in Python a backslash inside a
> > single quoted string has a special meaning, unlike Vim.
> I still think, it's somehow related to the handler. Or is this, too,
> written in Python?
>
> Out of curiousity, I tried the same but with a simple socket, established via "netcat".
> ["ex", "call feedkeys(\"ggOHello, world!\\e\")"] works
> ["ex", 'call feedkeys("ggOHello, world!\\e")'] does not

Yes, you must use double quoted strings. And then take care of what
Python does with the backslashes.

--
hundred-and-one symptoms of being an internet addict:
10. And even your night dreams are in HTML.

/// 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: Channel commands: special characters, quotes and escaping

> JSON has no single quoted literal
> strings, so your example *must* fail because it is not a valid JSON.

I think, this is the answer.

Maybe learning first how to write valid JSON is a good idea when playing around with channels. :-p

Thanks
Jan

--
--
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: Channel commands: special characters, quotes and escaping

2016-05-25 14:19 GMT+03:00 'Jan Bundesmann' via vim_use
<vim_use@googlegroups.com>:
>> I think this should also work:
>>
>> ["ex", 'call feedkeys("ggOHello, world!\\e")']
> Nope, it does not. Channel log says:
> 82.925983 RECV on 0: '["ex", 'call feedkeys("ggOHello, world!\\e")']'
> 82.926009 ERR on 0: Decoding failed - discarding input
>
>> Keep in mind this is in Python. And in Python a backslash inside a
>> single quoted string has a special meaning, unlike Vim.
> I still think, it's somehow related to the handler. Or is this, too, written in Python?
>
> Out of curiousity, I tried the same but with a simple socket, established via "netcat".

I have no idea why Bram said about Python. Unless you stated otherwise
messages in channel are in JSON and JSON has no single quoted literal
strings, so your example *must* fail because it is not a valid JSON.
There are also other modes, but if I understand `:h channel-commands`
correctly you will have to write handlers for ex, etc yourself if you
use another mode.

> ["ex", "call feedkeys(\"ggOHello, world!\\e\")"] works
> ["ex", 'call feedkeys("ggOHello, world!\\e")'] does not
>
> --
> --
> 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: Channel commands: special characters, quotes and escaping

> I think this should also work:
>
> ["ex", 'call feedkeys("ggOHello, world!\\e")']
Nope, it does not. Channel log says:
82.925983 RECV on 0: '["ex", 'call feedkeys("ggOHello, world!\\e")']'
82.926009 ERR on 0: Decoding failed - discarding input

> Keep in mind this is in Python. And in Python a backslash inside a
> single quoted string has a special meaning, unlike Vim.
I still think, it's somehow related to the handler. Or is this, too, written in Python?

Out of curiousity, I tried the same but with a simple socket, established via "netcat".
["ex", "call feedkeys(\"ggOHello, world!\\e\")"] works
["ex", 'call feedkeys("ggOHello, world!\\e")'] does not

--
--
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 24, 2016

Re: Use Register as Search Pattern in Ex Mode silent

On Tuesday, May 24, 2016 at 3:30:26 PM UTC-5, Marcel Jödicke wrote:
> vim c:\ip.txt -e -s +let @/=getline('.')
>
> and vim had problem somehow to use let in that context.

The problem is the space in the command. The shell doesn't understand that's a single argument to pass to Vim. Just use quotes:

vim c:\ip.txt -e -s +"let @/=getline('.')"

Or, the -c flag if you prefer:

vim c:\ip.txt -e -s -c "let @/=getline('.')"

--
--
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: Use Register as Search Pattern in Ex Mode silent

Am Freitag, 20. Mai 2016 10:30:30 UTC+2 schrieb Marcel Jödicke:
> Hello Community,
>
> I'd like to ask if there is somehow a way to use the Content I saved wit +%y+ before to the Clipboard in EX mode as Search Pattern for the File. I tried it with a ".. combination, but it doesn't work because powershell is complaining for a second " to close the string. I also tried it like \=@@ which works fine as replace pattern, but not for searches. I tried to set it to Register a with @a=@@ And I tried to paste it with <C-r>a , but it doesn't work, because commands like <C-r> are not working in written state. Do you have a solution for that problem. I also would be fine If there is a way to read out the seach pattern from a File somehow with :r.
>
> Thank you very much in advance!
>
> Marcel

Hello Ben,

yet again thanks for the explanations.
In my case I opened a File like:
vim c:\ip.txt -e -s +let @/=getline('.')

and vim had problem somehow to use let in that context. I now made just a litte java program for that purpose. But anyway, thank you very much for your help and effort!

--
--
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: Use Register as Search Pattern in Ex Mode silent

On Monday, May 23, 2016 at 4:44:35 AM UTC-5, Marcel Jödicke wrote:
>
> Hello Ben,
>
> Thank you very much for your answer!
>
> I looked into :execute, but I'm not really understand the way to use it. For example, I have now found a way to do that with let. I open my 3 files in seperate tabs with the -p parameter, copy my replacement pattern with let @@=getline('.'), copy my search pattern with @/=getline('.') and search and replace in the main File with :%s//\=@@/g how would I make such command with exec? Sadly the let command doesn't seem to work silent, else my problem would be solved...
>


What do you mean by, "the let command doesn't seem to work silent"? You can certainly invoke :let commands in a user mapping, commands from the shell, or wherever you need.

I'm confused what you're trying to do, actually.

Your original question was how to use a register as a search pattern from a command-line (not interactive). For a substitute command, that would be something like:

:execute 's/'.@a.'/replacement/'

Note how the :execute command takes a string, which you can build using a register content. Here, I used register @a.

You could also use the unnamed register @@, the copy register @0, the delete registers @1-@9, and more. The system clipboard is @+ or @*.

Your example you give uses "let" to set the content of the unnamed register. You could do this with just a yank command.

You said you had trouble using the "let" command silently, but I don't know what that means. Something like :let @/=getline('.') should work just fine.

--
--
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: Entries impossible in a Stoustrup code example

On Tuesday, May 24, 2016 at 10:30:40 AM UTC-5, aubertin.sylvain wrote:
> Le mardi 24 mai 2016 08:24:44 UTC+2, aubertin.sylvain a écrit :
> > The mame of this code is "list". It seems to be incomplete (nowhere a cin instruction). It runs but it doesn't work. May any one help me (I am a beginner).
> > Here is the code:
>
>
> Hi Dominique. I tried to do something with the result of the object file, without any success. I should like to have your opinion: is it possible with a new function (2 cin inside) to make this program complete ??
> I tried many times, but the compiler returns me a lot of errors. Thanks again.

This has nothing to do with Vim (the text editor) and should not be discussed further here on the Vim mailing list. Please take your question to a more appropriate forum, perhaps stackoverflow or another stackexchange site, perhaps a c++ mailing list somewhere.

Before you do that, you really really need to come up with a better problem statement. Don't respond here, but when you find an appropriate forum, make sure to define what you want the program to do. As others have pointed out, your program "works" just fine, as in, it does exactly what we'd expect from the code, and prints out a list with no user input.

See http://www.catb.org/~esr/faqs/smart-questions.html for advice on asking questions online. You've violated most of the basics already by posting to the wrong forum without a clear problem statement and ignoring the advice and questions you've already received.

--
--
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: Entries impossible in a Stoustrup code example

Le mardi 24 mai 2016 08:24:44 UTC+2, aubertin.sylvain a écrit :
> The mame of this code is "list". It seems to be incomplete (nowhere a cin instruction). It runs but it doesn't work. May any one help me (I am a beginner).
> Here is the code:
>
> /*phone_book.cpp*/
>
> #include<list>
> #include<iostream>
> #include<string>
> using namespace std;
>
> struct Entry {
> string name;
> int number;
> Entry(const string& n, int i) :name(n), number(i) { }
> };
>
> list<Entry> phone_book;
>
> void print_entries()
> /*
> this kind of function should use a parameter,
> rather then a global name
> */
> {
> typedef list<Entry>::const_iterator LI;
>
> for (LI i = phone_book.begin(); i != phone_book.end(); ++i) {
> const Entry& e = *i; // reference used as shorthand
> cout << '{' << e.name << ' ' << e.number << "}\n";
> }
> }
>
> void print_entry(const string& s)
> /*
> Is this the right treatment of a string not found?
> */
> {
> typedef list<Entry>::const_iterator LI;
> // 13/
> for (LI i = phone_book.begin(); i != phone_book.end(); ++i) {
> const Entry& e = *i; // reference used as shorthand
> if (s == e.name) {
> cout << e.name << ' ' << e.number << '\n';
> return;
> }
> }
> }
>
> void f(const Entry& e, list<Entry>::iterator i, list<Entry>::iterator p)
> /*
> just some nonsense code
> */
> {
> phone_book.push_front(e); // add at beginning
> phone_book.push_back(e); // add at end
> phone_book.insert(i,e); // add before the element referred to by `i'
>
> phone_book.erase(p); // remove the element referred to by `p'
> }
>
> int main()
> {
>
> phone_book.push_back(Entry("one",1));
> phone_book.push_back(Entry("two",2));
> phone_book.push_back(Entry("three",3));
> phone_book.push_back(Entry("four",4));
> phone_book.push_back(Entry("five",5));
> Entry six("six",6);
> print_entries();
> f(six,phone_book.begin(),phone_book.begin());
> print_entries();
> print_entry("four");
> print_entry("seven");
> print_entry("three");
> }
> Thanks again

Hi Dominique. I tried to do something with the result of the object file, without any success. I should like to have your opinion: is it possible with a new function (2 cin inside) to make this program complete ??
I tried many times, but the compiler returns me a lot of errors. Thanks again.

--
--
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: "Executing" vim files

On Tuesday, 24 May, 2016 at 09:32:32 BST, Michał Urban wrote:
>I've got file with extension vim, which is vim script (concretely this one: javascript.vim by Tye Zdrojewski). How to "execute" it? In vimrc?

You probably want to source it:
:source javascript.vim

If you want it to always be sourced for javascript files, put it in ~/.vim/after/ftplugin/javascript/

If it's really meant to be "executed", you'll want this ("man vim | less +/scriptin"):
vim -s javascript.vim

--
--
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: Channel commands: special characters, quotes and escaping

Jan Bundesmann wrote:

> I'm currently playing around with the new channel support and came
> across something I do not fully understand. Playing around with the
> demoserver.py I tried to send a command to my vim-instance via
> feedkeys. The original command was:
>
> :call feedkeys("ggOHello, world!\e")
>
> >From within vim this works. I tried to enter it in the server stdin as:
>
> ["ex", "..."]
>
> and had to fight with the nested quotes. The special character "\e" is only accepted within double-quotes. So I tried to include the whole call-command in single quotes which is not accepted by the default handler leaving me with
>
> ["ex", 'call feedkeys("ggOHello, world!\e")']
> > Decoding failed - discarding input
>
> in the ch_log. A working version is
>
> ["ex", "call feedkeys(\"ggOHello, world!\\e\")"]
>
> with a lot of escapes. I do not understand why the first solution does
> not work.

Keep in mind this is in Python. And in Python a backslash inside a
single quoted string has a special meaning, unlike Vim.

I think this should also work:

["ex", 'call feedkeys("ggOHello, world!\\e")']

The text inside single quotes is a Python string, where the actual
resulting text is:
call feedkeys("ggOHello, world!\e")

And then Vim will interpret the \e in double quotes as an escape.


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

Re: dictionary completion for words including `@' sign

It sounds like what snippet is for? Have you tried making snippets for the email addresses or even signature?

On Friday, May 20, 2016 at 2:40:40 AM UTC+8, Eric Smith wrote:
> How do I return
> foo<tab>
> foo.bar@baz.com
>
> And if I go.
> <tab>
> it expands to
> foo.bar
> baz
>
> what gives?
>
> Eric

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

"Executing" vim files

Hi guys,

I've got file with extension vim, which is vim script (concretely this one: javascript.vim by Tye Zdrojewski). How to "execute" it? In vimrc?

--
--
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: Entries impossible in a Stoustrup code example

aubertin.sylvain <aubertin.sylvain@sfr.fr> wrote:

> The mame of this code is "list". It seems to be incomplete (nowhere a cin instruction). It runs but it doesn't work. May any one help me (I am a beginner).
> Here is the code:

This question is completely unrelated to Vim, so please do not
post questions unrelated to vim in this mailing list. You should
instead post c++ questions to a c++ mailing list.

Anyway, your code compiles fine and runs.
It's just a code example. There is no need for std::cin.

$ g++ foo.cpp
$ ./a.out
{one 1}
{two 2}
{three 3}
{four 4}
{five 5}
{six 6}
{six 6}
{two 2}
{three 3}
{four 4}
{five 5}
{six 6}
four 4
three 3

Regards
Dominique

--
--
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: Entries impossible in a Stoustrup code example

Am 2016-05-24 08:24, schrieb aubertin.sylvain:
> The mame of this code is "list". It seems to be incomplete (nowhere a
> cin instruction). It runs but it doesn't work. May any one help me (I
> am a beginner).

And your problem with Vim is exactly what?


Best,
Christian

--
--
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 23, 2016

Entries impossible in a Stoustrup code example

The mame of this code is "list". It seems to be incomplete (nowhere a cin instruction). It runs but it doesn't work. May any one help me (I am a beginner).
Here is the code:

/*phone_book.cpp*/

#include<list>
#include<iostream>
#include<string>
using namespace std;

struct Entry {
string name;
int number;
Entry(const string& n, int i) :name(n), number(i) { }
};

list<Entry> phone_book;

void print_entries()
/*
this kind of function should use a parameter,
rather then a global name
*/
{
typedef list<Entry>::const_iterator LI;

for (LI i = phone_book.begin(); i != phone_book.end(); ++i) {
const Entry& e = *i; // reference used as shorthand
cout << '{' << e.name << ' ' << e.number << "}\n";
}
}

void print_entry(const string& s)
/*
Is this the right treatment of a string not found?
*/
{
typedef list<Entry>::const_iterator LI;
// 13/
for (LI i = phone_book.begin(); i != phone_book.end(); ++i) {
const Entry& e = *i; // reference used as shorthand
if (s == e.name) {
cout << e.name << ' ' << e.number << '\n';
return;
}
}
}

void f(const Entry& e, list<Entry>::iterator i, list<Entry>::iterator p)
/*
just some nonsense code
*/
{
phone_book.push_front(e); // add at beginning
phone_book.push_back(e); // add at end
phone_book.insert(i,e); // add before the element referred to by `i'

phone_book.erase(p); // remove the element referred to by `p'
}

int main()
{

phone_book.push_back(Entry("one",1));
phone_book.push_back(Entry("two",2));
phone_book.push_back(Entry("three",3));
phone_book.push_back(Entry("four",4));
phone_book.push_back(Entry("five",5));
Entry six("six",6);
print_entries();
f(six,phone_book.begin(),phone_book.begin());
print_entries();
print_entry("four");
print_entry("seven");
print_entry("three");
}
Thanks again

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