Thursday, October 31, 2013

Re: Vim variables not being created.

On Thursday, October 31, 2013 1:16:36 PM UTC+4, MarcWeber wrote:
> There are several problems:
>
> - You didn't RTFM. http://www.vim.org/scripts/script.php?script_id=2372
> clearly talks about where to put that file
>
> Consider joining the vim-addon-manager (VAM) [1] project which tries very hard to
> get such things right by default for plugins being used by the
> community.
>
> In this particular case it does.

It did *not*. There was no information about where to put the file by the time you were writing the message and VAM was putting file into ftplugin/ which is incorrect.

> I agree that its most useful to understand how Vim and Vim plugins work.
> But this takes time.
>
> Marc Weber
>
> [1]: https://github.com/MarcWeber/vim-addon-manager
>
> compare with http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html
> which lists more plugin management options and tries to compare them.
>
> (If anybody thinks this page is unfair write me or just edit it. You can
> help make this be a fair and easy to use source of knowledge if you want
> to)

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

Re: Insert comand output on current text

On Wednesday, October 30, 2013 7:26:44 PM UTC-5, andalou wrote:
> I want to write the ouptut of 1,.s/^# /&/n into the current text.
>
> Let's say that the output of the above command is:
>
> 8 matches on 8 lines
>
>

You can get this output with the :redir command. Put it in the unnamed register:

:redir @"
:your command here
:redir END

Now paste with p

>
> On the current text I'd like to insert the string "ch007.html" (without
>
> quotes) without newlines inserted. Is it possible?
>

This request I don't understand at all. Please give a before-and-after example.

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

Re: inserting filenames

On 2013-10-31 15:13, Chris Lott wrote:
> amalek-pages_01-Blot.png
> amalek-pages_02-New.png
> amalek-pages_03-Adipose.png
>
> I need to create a series of HTML sections like such:
>
> <section>
> <img width="550" height="650"
> src="pages/amalek-pages_02-New.png" alt="Blot">
> </section>
>
> Where do I start automating something like this with Vim?

I'd do the following:

1) read the list of filenames into Vim

:r !ls " on *nix systems
:r !dir /b " on Win32 systems

2) do a substitute over the range of lines you read in:

:%s@.*@<section>\r\t<img width="550" height="650"\rsrc="pages/&"
alt="Blot">\r</section>

You can adjust the regexp replacement as needed (the extra "\r"
before the src= might be some mail-goblin in the wires line-breaking
your email, rather than your desire for an actual line-break there).
If you need to update the alt-text too, you'd need to capture that
part and use it in the replacement:

:%s@^.\{-}_\d\+-\(.*\)\.png@<section>\r\t<img width="550"
height="650"\rsrc="pages/&" alt="\1">\r</section>

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

inserting filenames

I have a directory of files named such:

amalek-pages_01-Blot.png
amalek-pages_02-New.png
amalek-pages_03-Adipose.png
...

I need to create a series of HTML sections like such:

<section>
<img width="550" height="650"
src="pages/amalek-pages_01-Blot.png" alt="Blot">
</section>
<section>
<img width="550" height="650"
src="pages/amalek-pages_02-New.png" alt="Blot">
</section>
<section>
<img width="550" height="650"
src="pages/amalek-pages_03-Adipose.png" alt="Blot">
</section>
...

Tab completion on filenames helps, but with 55 images I have to
navigate through the list further and further for each section...and I
don't see a good way to jump directly to a particular entry in the
completion list (if I could, problem solved: I could just start the
completion and type "15" or "16" etc).

Where do I start automating something like this with Vim?

c
--
Chris Lott <chris@chrislott.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/groups/opt_out.

Re: test directory writable


On Nov 1, 2013 12:04 AM, "shawn wilson" <ag4ve.us@gmail.com> wrote:
>
> I see filereadable() and filewritable() but I don't see how to do that
> with a directory. My problem is that our vimrc specifies a swpfile
> directory which is fine for users created with skel, but if it's not
> present (for root or users not created with skel) I'd like it to not
> error and require :w! and the like to function.

filewriteable() is what should be used to check whether directory is writeable: reread its documentation. I do not know any equivalents to filereadable() for directories.

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

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

test directory writable

I see filereadable() and filewritable() but I don't see how to do that
with a directory. My problem is that our vimrc specifies a swpfile
directory which is fine for users created with skel, but if it's not
present (for root or users not created with skel) I'd like it to not
error and require :w! and the like to function.

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

gvim window shrinks after executing "set guifont" in session file

…In arch linux in vim 7.3, 7.4 by `gvim -S session` or ":so session".
In 7.3 this thing can be curing by adding "win …" after "set guifont=…"
in session file, but not in 7.4.
In 7.4 i try to make session with appropriate window size by adding to
'sessionoptions' "resize", "winpos" words. No effect.
Why does setting up 'guifont' resize gvim window?
How to prevent ":mksession" from writing "set guifont", or avoid this
annoying behaviour?

===

http://ipic.su/img/img7/fs/how_it_is_and_how_it_must_to_be.1383247621.png

===

~/.gvimrc

"setting up window size
autocmd GUIEnter * win 80 41
"open in right top corner, below status bar/dmenu
autocmd GUIEnter * winpos 640 20
set guifont=DejaVu\ Sans\ Mono\ 11
"set guifont=Terminus\ 10
"hiding top menu
set guioptions-=m
"hiding gray panel
set guioptions-=e
"hiding icon
set guioptions-=i
"disable right scrollbar
set guioptions-=r

set display+=lastline

:noremap k gk
:noremap j gj

===

:version

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 3 2013 19:58:40)
Included patches: 1-16
Compiled by Arch Linux
Huge version with GTK2 GUI. Features included (+) or not (-):
+acl +farsi +mouse_netterm +syntax
+arabic +file_in_path +mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
+balloon_eval +float +mouse_urxvt -tag_any_white
+browse +folding +mouse_xterm -tcl
++builtin_terms -footer +multi_byte +terminfo
+byte_offset +fork() +multi_lang +termresponse
+cindent +gettext -mzscheme +textobjects
+clientserver -hangul_input +netbeans_intg +title
+clipboard +iconv +path_extra +toolbar
+cmdline_compl +insert_expand +perl +user_commands
+cmdline_hist +jumplist +persistent_undo +vertsplit
+cmdline_info +keymap +postscript +virtualedit
+comments +langmap +printer +visual
+conceal +libcall +profile +visualextra
+cryptv +linebreak +python +viminfo
+cscope +lispindent -python3 +vreplace
+cursorbind +listcmds +quickfix +wildignore
+cursorshape +localmap +reltime +wildmenu
+dialog_con_gui +lua +rightleft +windows
+diff +menu +ruby +writebackup
+digraphs +mksession +scrollbind +X11
+dnd +modify_fname +signs -xfontset
-ebcdic +mouse +smartindent +xim
+emacs_tags +mouseshape -sniff +xsmp_interact
+eval +mouse_dec +startuptime +xterm_clipboard
+ex_extra +mouse_gpm +statusline -xterm_save
+extra_search -mouse_jsbterm -sun_workshop -xpm
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "/etc/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo
-I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/libpng16
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16
-I/usr/include/pango-1.0 -I/usr/include/harfbuzz
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/freetype2
-D_FORTIFY_SOURCE=2 -I/usr/local/include -march=x86-64 -mtune=generic
-O2 -pipe -fstack-protector --param=ssp-buffer-size=4
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -Wl,-O1,--sort-common,--as-needed,-z,relro
-fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E
-Wl,-rpath,/usr/lib/perl5/core_perl/CORE
-Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib
-Wl,--as-needed -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0
-latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0
-lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lSM
-lICE -lXt -lX11 -lXdmcp -lSM -lICE -lm -lncurses -lelf -lnsl -lacl
-lattr -lgpm -ldl -L/usr/lib -llua -Wl,-E
-Wl,-rpath,/usr/lib/perl5/core_perl/CORE
-Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector
-L/usr/local/lib -L/usr/lib/perl5/core_perl/CORE -lperl -lnsl -ldl
-lm -lcrypt -lutil -lpthread -lc -L/usr/lib/python2.7/config
-lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic
-lruby -lpthread -lrt -ldl -lcrypt -lm -L/usr/lib



Oleg Obnoskin

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

Re: Vim variables not being created.


On Oct 31, 2013 1:47 PM, "sai baba" <baba.2288@gmail.com> wrote:
>
> On Thursday, October 31, 2013 1:13:36 PM UTC+5:30, Christian Brabandt wrote:
> > On Thu, October 31, 2013 07:07, sai baba wrote:
> >
> > > On Wednesday, October 30, 2013 9:14:36 PM UTC+5:30, MarcWeber wrote:
> >
> > >> When does viml code get run (which defines vars)?
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> If you have the default setup, thus such (ftplugin etc enabled)
> >
> > >>
> >
> > >> http://vim-wiki.mawercer.de/wiki/topic/vimrc.html
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> Then ftplugin/*.vim files get sourced when such a filetype is opened.
> >
> > >>
> >
> > >>   plugin/**/.vim files get sourced on startup
> >
> > >>
> >
> > >>   autoload/** get sourced automatically as needed (function autolad
> >
> > >> feature)
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> There are some more less cases such as ftdetect,syntax,... which I don't
> >
> > >>
> >
> > >> consider important.
> >
> > >>
> >
> > >> Thus make sure you're using such minimal .vimrc, if you still have
> >
> > >>
> >
> > >> problems with the plugin post again, then it might be a bug in the
> >
> > >>
> >
> > >> plugin or a filetype it did'nt expect.
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> I haven't looked at the plugin yet - so everything I wrote about is
> >
> > >>
> >
> > >> important to know, but might not solve your issue.
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> Marc Weber
> >
> > >
> >
> > > Hi..
> >
> > >
> >
> > > I have downloaded the pulgin from the below link..
> >
> > >
> >
> > > http://www.vim.org/scripts/script.php?script_id=2372
> >
> > >
> >
> > > File :: automatic.vim is the one im using.
> >
> > >
> >
> > > Im placing this file in my home directory(linux)
> >
> > > ~/.vim/ftdetect/automatic.vim
> >
> >
> >
> > It's a filetype plugin, so you need to place it in ~/.vim/ftplugin/verilog/
> >
> > (create directories, that don't exist), assuming that the filetype
> >
> > for verilog files is called verilog.
> >
> >
> >
> > Best,
> >
> > Christian
>
> Placing the file in ~/.vim/ftplugin/verilog/ did NOT WORK, hence i tried placing the file in ~/.vim/ftdetect/ and i was able to load the script.

As Marc correctly said "installation details" section on the plugin page clearly shows you where to put the file. The location is neither ./ftplugin/verilog nor ./ftdetect.

> variables inside a function are being created but not from script.
>
> Thanks
> sai
>
> --
> --
> 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/groups/opt_out.

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

Re: Vim variables not being created.


On Oct 31, 2013 1:47 PM, "sai baba" <baba.2288@gmail.com> wrote:
>
> On Thursday, October 31, 2013 1:13:36 PM UTC+5:30, Christian Brabandt wrote:
> > On Thu, October 31, 2013 07:07, sai baba wrote:
> >
> > > On Wednesday, October 30, 2013 9:14:36 PM UTC+5:30, MarcWeber wrote:
> >
> > >> When does viml code get run (which defines vars)?
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> If you have the default setup, thus such (ftplugin etc enabled)
> >
> > >>
> >
> > >> http://vim-wiki.mawercer.de/wiki/topic/vimrc.html
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> Then ftplugin/*.vim files get sourced when such a filetype is opened.
> >
> > >>
> >
> > >>   plugin/**/.vim files get sourced on startup
> >
> > >>
> >
> > >>   autoload/** get sourced automatically as needed (function autolad
> >
> > >> feature)
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> There are some more less cases such as ftdetect,syntax,... which I don't
> >
> > >>
> >
> > >> consider important.
> >
> > >>
> >
> > >> Thus make sure you're using such minimal .vimrc, if you still have
> >
> > >>
> >
> > >> problems with the plugin post again, then it might be a bug in the
> >
> > >>
> >
> > >> plugin or a filetype it did'nt expect.
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> I haven't looked at the plugin yet - so everything I wrote about is
> >
> > >>
> >
> > >> important to know, but might not solve your issue.
> >
> > >>
> >
> > >>
> >
> > >>
> >
> > >> Marc Weber
> >
> > >
> >
> > > Hi..
> >
> > >
> >
> > > I have downloaded the pulgin from the below link..
> >
> > >
> >
> > > http://www.vim.org/scripts/script.php?script_id=2372
> >
> > >
> >
> > > File :: automatic.vim is the one im using.
> >
> > >
> >
> > > Im placing this file in my home directory(linux)
> >
> > > ~/.vim/ftdetect/automatic.vim
> >
> >
> >
> > It's a filetype plugin, so you need to place it in ~/.vim/ftplugin/verilog/
> >
> > (create directories, that don't exist), assuming that the filetype
> >
> > for verilog files is called verilog.
> >
> >
> >
> > Best,
> >
> > Christian
>
> Placing the file in ~/.vim/ftplugin/verilog/ did NOT WORK, hence i tried placing the file in ~/.vim/ftdetect/ and i was able to load the script.

"Did NOT WORK" does not provide any useful information. What did you observe so that you say that placing does not work?

> variables inside a function are being created but not from script.
>
> Thanks
> sai
>
> --
> --
> 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/groups/opt_out.

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

Re: Vim variables not being created.

On Thursday, October 31, 2013 1:13:36 PM UTC+5:30, Christian Brabandt wrote:
> On Thu, October 31, 2013 07:07, sai baba wrote:
>
> > On Wednesday, October 30, 2013 9:14:36 PM UTC+5:30, MarcWeber wrote:
>
> >> When does viml code get run (which defines vars)?
>
> >>
>
> >>
>
> >>
>
> >> If you have the default setup, thus such (ftplugin etc enabled)
>
> >>
>
> >> http://vim-wiki.mawercer.de/wiki/topic/vimrc.html
>
> >>
>
> >>
>
> >>
>
> >> Then ftplugin/*.vim files get sourced when such a filetype is opened.
>
> >>
>
> >> plugin/**/.vim files get sourced on startup
>
> >>
>
> >> autoload/** get sourced automatically as needed (function autolad
>
> >> feature)
>
> >>
>
> >>
>
> >>
>
> >> There are some more less cases such as ftdetect,syntax,... which I don't
>
> >>
>
> >> consider important.
>
> >>
>
> >> Thus make sure you're using such minimal .vimrc, if you still have
>
> >>
>
> >> problems with the plugin post again, then it might be a bug in the
>
> >>
>
> >> plugin or a filetype it did'nt expect.
>
> >>
>
> >>
>
> >>
>
> >> I haven't looked at the plugin yet - so everything I wrote about is
>
> >>
>
> >> important to know, but might not solve your issue.
>
> >>
>
> >>
>
> >>
>
> >> Marc Weber
>
> >
>
> > Hi..
>
> >
>
> > I have downloaded the pulgin from the below link..
>
> >
>
> > http://www.vim.org/scripts/script.php?script_id=2372
>
> >
>
> > File :: automatic.vim is the one im using.
>
> >
>
> > Im placing this file in my home directory(linux)
>
> > ~/.vim/ftdetect/automatic.vim
>
>
>
> It's a filetype plugin, so you need to place it in ~/.vim/ftplugin/verilog/
>
> (create directories, that don't exist), assuming that the filetype
>
> for verilog files is called verilog.
>
>
>
> Best,
>
> Christian

Placing the file in ~/.vim/ftplugin/verilog/ did NOT WORK, hence i tried placing the file in ~/.vim/ftdetect/ and i was able to load the script.

variables inside a function are being created but not from script.

Thanks
sai

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

Re: Vim variables not being created.

There are several problems:

- You didn't RTFM. http://www.vim.org/scripts/script.php?script_id=2372
clearly talks about where to put that file

Consider joining the vim-addon-manager (VAM) [1] project which tries very hard to
get such things right by default for plugins being used by the
community.

In this particular case it does.

I agree that its most useful to understand how Vim and Vim plugins work.
But this takes time.

Marc Weber

[1]: https://github.com/MarcWeber/vim-addon-manager

compare with http://vim-wiki.mawercer.de/wiki/topic/vim%20plugin%20managment.html
which lists more plugin management options and tries to compare them.

(If anybody thinks this page is unfair write me or just edit it. You can
help make this be a fair and easy to use source of knowledge if you want
to)

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

Re: Vim variables not being created.

On Thu, October 31, 2013 07:07, sai baba wrote:
> On Wednesday, October 30, 2013 9:14:36 PM UTC+5:30, MarcWeber wrote:
>> When does viml code get run (which defines vars)?
>>
>>
>>
>> If you have the default setup, thus such (ftplugin etc enabled)
>>
>> http://vim-wiki.mawercer.de/wiki/topic/vimrc.html
>>
>>
>>
>> Then ftplugin/*.vim files get sourced when such a filetype is opened.
>>
>> plugin/**/.vim files get sourced on startup
>>
>> autoload/** get sourced automatically as needed (function autolad
>> feature)
>>
>>
>>
>> There are some more less cases such as ftdetect,syntax,... which I don't
>>
>> consider important.
>>
>> Thus make sure you're using such minimal .vimrc, if you still have
>>
>> problems with the plugin post again, then it might be a bug in the
>>
>> plugin or a filetype it did'nt expect.
>>
>>
>>
>> I haven't looked at the plugin yet - so everything I wrote about is
>>
>> important to know, but might not solve your issue.
>>
>>
>>
>> Marc Weber
>
> Hi..
>
> I have downloaded the pulgin from the below link..
>
> http://www.vim.org/scripts/script.php?script_id=2372
>
> File :: automatic.vim is the one im using.
>
> Im placing this file in my home directory(linux)
> ~/.vim/ftdetect/automatic.vim

It's a filetype plugin, so you need to place it in ~/.vim/ftplugin/verilog/
(create directories, that don't exist), assuming that the filetype
for verilog files is called verilog.

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

Re: Smart horizontal cursor positioning (like in an addon for Sublime Text)?

Thanks a lot to both of you!

It seems I've forgotten so many things about vim in the past year ;(

Atm I'm fighting with key mappings within neocomplete & neosnippet *sigh*

*Wave*
Jeraldine

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

Wednesday, October 30, 2013

Re: Vim variables not being created.

On Wednesday, October 30, 2013 9:14:36 PM UTC+5:30, MarcWeber wrote:
> When does viml code get run (which defines vars)?
>
>
>
> If you have the default setup, thus such (ftplugin etc enabled)
>
> http://vim-wiki.mawercer.de/wiki/topic/vimrc.html
>
>
>
> Then ftplugin/*.vim files get sourced when such a filetype is opened.
>
> plugin/**/.vim files get sourced on startup
>
> autoload/** get sourced automatically as needed (function autolad feature)
>
>
>
> There are some more less cases such as ftdetect,syntax,... which I don't
>
> consider important.
>
> Thus make sure you're using such minimal .vimrc, if you still have
>
> problems with the plugin post again, then it might be a bug in the
>
> plugin or a filetype it did'nt expect.
>
>
>
> I haven't looked at the plugin yet - so everything I wrote about is
>
> important to know, but might not solve your issue.
>
>
>
> Marc Weber

Hi..

I have downloaded the pulgin from the below link..

http://www.vim.org/scripts/script.php?script_id=2372

File :: automatic.vim is the one im using.

Im placing this file in my home directory(linux) ~/.vim/ftdetect/automatic.vim

is this the cause of problem??

All local buffer variables(with b:*) in file automatic.vim are undefined.

But i can still see the verilog menu being loaded from automatic.vim in my Gvim menu bar.

Im using Gvim version 703.

Thanks
sai

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

Insert comand output on current text

I want to write the ouptut of 1,.s/^# /&/n into the current text.
Let's say that the output of the above command is:
8 matches on 8 lines

On the current text I'd like to insert the string "ch007.html" (without
quotes) without newlines inserted. Is it possible?

Many thanks in advance,

--
Cesar

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

Re: Why is this VimLeave autocommand causing 'E749: empty buffer' ?

On Wed, Oct 30, 2013 at 7:18 PM, Christian Brabandt <cblists@256bit.org> wrote:
 
By the time, Vim handles the deadly signal, it won't call unsafe
functions anymore (e.g. allocate memory) so I doubt it will be possible
to achieve what you want.
 
So theres nothing I can do to gracefully close vim when the computer system shuts down? Whats the use case for the v:dying variable then?

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

Re: Vim persistent undo

On Mo, 28 Okt 2013, erdogan.kerem wrote:

> Hi,
>
> I just enabled persistent undo in vim, but realized that before turning on
> persistent undo, it was occasionally useful debugging for me to undo my
> changes until when I first opened the file, then play them back to see if I
> had made any unintended changes. With persistent undo, however, I'm not sure
> how to know when I get back to the state in which I first opened the file.
> Does anyone have any ideas on how to find this out with persistent undo
> enabled?

That is not easily possible, because Vim doesn't keep track of the time,
when you first opened the file. May be this helps:

aug MyPersistentUndo
au!
au BufNewFile,BufReadPost * :let b:undo_nr = changenr() | com -buffer ResetOpenedFile :exe (b:undo_nr ? ":undo ". b:undo_nr : ':undo 1|norm! g-')
augroup END

And then use :ResetOpenedFile to go back to the time, when you first
opened the buffer.


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

Re: Why is this VimLeave autocommand causing 'E749: empty buffer' ?

On Mi, 30 Okt 2013, Gary Johnson wrote:

> On 2013-10-30, Thiago de Arruda wrote:
> > I'm trying to setup vim to save all files when it receives
> > SIGTERM, here's the relevant vim command:
> >
> > au VimLeave * if v:dying | wa | endif
> >
> > This should write all buffers when vim exits. From another
> > terminal if I kill vim with a modified buffer I get the following
> > error:
> >
> > Vim: Caught deadly signal TERM
> > Vim: preserving files...
> > Error detected while processing VimLeave Auto commands for "*":Vim: Finished.
> >
> > E749: empty buffer
> >
> > If I kill vim without modifying any buffers it doesn't report any
> > error.
> >
> > Does anyone knows why this is happening or how to fix it(or
> > another workaround for my problem: saving all files when vim
> > receives SIGTERM)
>
> I don't know the answer. My guess is that Vim has in some sense
> deleted all its buffers by the time it processes the VimLeave event
> so that there are no buffers to write. If you haven't modified any
> buffers, Vim does not attempt to write any, so you don't encounter
> the error.

correct.
> ":help E749" is extremely unhelpful. I learned a little by
> searching the source code for "E749" and then for the variable that
> contains that string, e_emptybuf.
>
> The text around ":help VimLeave" suggests that VimLeavePre might
> work better for this.

No it won't. Vim calls deathtrap() function, which closes all buffers,
and then calls getout(), in which all autocommands are processed
(BufWinLeave, BufUnLoad, VimLeavePre and finally VimLeave). But by that
time, you can't safe any buffers anymore.

By the time, Vim handles the deadly signal, it won't call unsafe
functions anymore (e.g. allocate memory) so I doubt it will be possible
to achieve what you want.

Best,
Christian
--
> Betriebssystem ... : MS-DOS
Falsche Angabe. Hier dürfen nur Betriebsysteme eingetragen werden.
-- Nora E. Etukudo

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

Re: Why is this VimLeave autocommand causing 'E749: empty buffer' ?

On 2013-10-30, Thiago de Arruda wrote:
> I'm trying to setup vim to save all files when it receives
> SIGTERM, here's the relevant vim command:
>
> au VimLeave * if v:dying | wa | endif
>
> This should write all buffers when vim exits. From another
> terminal if I kill vim with a modified buffer I get the following
> error:
>
> Vim: Caught deadly signal TERM
> Vim: preserving files...
> Error detected while processing VimLeave Auto commands for "*":Vim: Finished.
>
> E749: empty buffer
>
> If I kill vim without modifying any buffers it doesn't report any
> error.
>
> Does anyone knows why this is happening or how to fix it(or
> another workaround for my problem: saving all files when vim
> receives SIGTERM)

I don't know the answer. My guess is that Vim has in some sense
deleted all its buffers by the time it processes the VimLeave event
so that there are no buffers to write. If you haven't modified any
buffers, Vim does not attempt to write any, so you don't encounter
the error.

":help E749" is extremely unhelpful. I learned a little by
searching the source code for "E749" and then for the variable that
contains that string, e_emptybuf.

The text around ":help VimLeave" suggests that VimLeavePre might
work better for this.

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

Why is this VimLeave autocommand causing 'E749: empty buffer' ?

I'm trying to setup vim to save all files when it receives SIGTERM, here's the relevant vim command:

au VimLeave * if v:dying | wa | endif

This should write all buffers when vim exits. From another terminal if I kill vim with a modified buffer I get the following error:

Vim: Caught deadly signal TERM
Vim: preserving files...
Error detected while processing VimLeave Auto commands for "*":Vim: Finished.

E749: empty buffer

If I kill vim without modifying any buffers it doesn't report any error.

Does anyone knows why this is happening or how to fix it(or another workaround for my problem: saving all files when vim receives SIGTERM)

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

Re: Vim persistent undo

On 28 October 2013, erdogan.kerem <dzy689@gmail.com> wrote:
> Hi,
>
> I just enabled persistent undo in vim, but realized that before turning on
> persistent undo, it was occasionally useful debugging for me to undo my
> changes until when I first opened the file, then play them back to see if I
> had made any unintended changes. With persistent undo, however, I'm not sure
> how to know when I get back to the state in which I first opened the file.
> Does anyone have any ideas on how to find this out with persistent undo
> enabled?

You might consider taking a look at Gundo:

https://github.com/sjl/gundo.vim

Gundo needs Python, and Python support in Vim. There are a
few other similar plugins written in pure VimL (f.i. undotree, see
https://github.com/mbbill/undotree), but in my experience all of them
have other shortcomings.

/lcd

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

Re: changing Vim`s logo

> You might also try MacVim's logo, which is decent - at least, it's
> relatively high res & doesn't have fugly aliasing round the edges
> https://github.com/b4winckler/macvim/blob/master/src/MacVim/icons/vim-noshadow-512.png

We need to distinguish between problems with the resolution and rendition of the logo and the actual intended logo design.

We've got high res and SVG versions of the original logo which can be used to generate quality images of any size.

The concept at http://article.gmane.org/gmane.editors.vim/112613 is an evolution of the existing design and improving the rendition of the existing logo is not an answer to what it offers.

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

Re: Vim variables not being created.

When does viml code get run (which defines vars)?

If you have the default setup, thus such (ftplugin etc enabled)
http://vim-wiki.mawercer.de/wiki/topic/vimrc.html

Then ftplugin/*.vim files get sourced when such a filetype is opened.
plugin/**/.vim files get sourced on startup
autoload/** get sourced automatically as needed (function autolad feature)

There are some more less cases such as ftdetect,syntax,... which I don't
consider important.
Thus make sure you're using such minimal .vimrc, if you still have
problems with the plugin post again, then it might be a bug in the
plugin or a filetype it did'nt expect.

I haven't looked at the plugin yet - so everything I wrote about is
important to know, but might not solve your issue.

Marc Weber

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

Re: dbext version 20 does not prompt for connection profile


On Tue, Oct 29, 2013 at 7:51 AM, NJia <jiananmail@gmail.com> wrote:
Hi Everyone

I just upgraded my dbext plugin from version 19 to 20 but noticed that version 20 does not prompt for connection profiles any more.

I have two MYSQL connection defined in my .vimrc when I type "\slt"  v19 asks me which connection profile I want to use.

But version 20 just display an error message "dbext:A valid database type must be chosen", I have to issue command "\sbp" to select the connection first.

anyway to change this in version 20 ?


Assuming you have 2 profiles defined in your .vimrc:

let g:dbext_default_profile_A = 'type=ASA:dsnname=cons'
let g:dbext_default_profile_B = 'type=ASA:dsnname=cons_prime'

Hmmm, I believe if you define:
let g:dbext_default_profile = 'A'

Then run your \slt this might pick up the A profile first.

Please let me know.

Thanks for the report, I will look into the issue.

David


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

Re: Smart horizontal cursor positioning (like in an addon for Sublime Text)?

On 2013-10-30 07:52, Ben Fritz wrote:
> Or just ignore me and use Tim's suggestion. Apparently there is a
> built-in command if you're already in insert mode. I LEARNED
> SOMETHING NEW TODAY!

heh, I only learned this recently myself in a VimGolf challenge where
@udioica used it to make an impressively low score.

It's not yet in my muscle-memory, but I remembered enough to disinter
it from the vim docs when the OP's request sounded exactly like this
functionality.

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

Re: Vim variables not being created.

On Wednesday, October 30, 2013 8:22:52 AM UTC-5, sai baba wrote:
> Hi,
>
> Im new to Vim scripting.
>
> Im using a ftplugin from vimscripts.org and im getting a error E121 saying the variable is undefined.
>
> From my understanding any variables with scope w: or b: or l: or s: are not being created in my Gvim editor.
>
> I tried typing :let to see list of variables declared and i find, the variables declared in my script are not being listed or created.
>
> please help me in understanding..
>
> ps: Im using Gvim version 703 on linux machine.
>
> Thanks in advance
> sai

Yeeeeah...these should work in any Vim except maybe with TINY features.

What plugin? What variable? I suspect a plugin issue. Or maybe the plugin was designed for a more recent Vim. What exact Vim version do you have? There were over 1000 patches between the 7.3 and 7.4 releases.

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

Re: Smart horizontal cursor positioning (like in an addon for Sublime Text)?

On Wednesday, October 30, 2013 9:50:19 AM UTC-5, Ben Fritz wrote:
> On Tuesday, October 29, 2013 7:40:00 AM UTC-5, Jeraldine Walter wrote:
> > Hi,
> >
> > I want to switch back to gVim after working with ST for a while.
> >
> > There is an addon for ST, that provides a really slick way of placing the cursor on "the right" position when using cursor up / down after editing text on a line.
> >
> > This is the link that explains what it does (in a better way):
> > http://www.sublimetext.com/forum/viewtopic.php?f=4&t=2529&start=0
> >
> > Does anyone know if something like this exists for (g)vim as well?
> >
>
> I don't know of anything like that, but maybe there is a plugin for it.
>
> However, I do know the '[ mark contains the start position where you last made a change. So, you could do something like this:
>
> [script removed]

Or just ignore me and use Tim's suggestion. Apparently there is a built-in command if you're already in insert mode. I LEARNED SOMETHING NEW TODAY!

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

Re: Smart horizontal cursor positioning (like in an addon for Sublime Text)?

On 2013-10-29 05:40, Jeraldine Walter wrote:
> I want to switch back to gVim after working with ST for a while.

Welcome back :-)

> There is an addon for ST, that provides a really slick way of
> placing the cursor on "the right" position when using cursor up /
> down after editing text on a line.
>
> This is the link that explains what it does (in a better way):
> http://www.sublimetext.com/forum/viewtopic.php?f=4&t=2529&start=0
>
> Does anyone know if something like this exists for (g)vim as well?

It sounds like you want to use control+G control+J in Insert mode:

:help i_CTRL-G_CTRL-J

which will move the cursor down one line but horizontally position you
based on your insertion-start point.

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

Re: Smart horizontal cursor positioning (like in an addon for Sublime Text)?

On Tuesday, October 29, 2013 7:40:00 AM UTC-5, Jeraldine Walter wrote:
> Hi,
>
> I want to switch back to gVim after working with ST for a while.
>
> There is an addon for ST, that provides a really slick way of placing the cursor on "the right" position when using cursor up / down after editing text on a line.
>
> This is the link that explains what it does (in a better way):
> http://www.sublimetext.com/forum/viewtopic.php?f=4&t=2529&start=0
>
> Does anyone know if something like this exists for (g)vim as well?
>

I don't know of anything like that, but maybe there is a plugin for it.

However, I do know the '[ mark contains the start position where you last made a change. So, you could do something like this:

function! JumpIfChanged(move)
let movement=a:move " initialize to passed-in command
if line("'[") == line(".")
let movement = "`[".movement " jump to start of change first
endif
return movement
endfun

nnoremap <expr> j JumpIfChanged('j')
nnoremap <expr> k JumpIfChanged('k')

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

Re: Vim persistent undo

On Monday, October 28, 2013 4:01:43 PM UTC-5, David Ye wrote:
> Hi,
>
>
>
> I just enabled persistent undo in vim, but realized that before turning on
>
> persistent undo, it was occasionally useful debugging for me to undo my
>
> changes until when I first opened the file, then play them back to see if I
>
> had made any unintended changes. With persistent undo, however, I'm not sure
>
> how to know when I get back to the state in which I first opened the file.
>
> Does anyone have any ideas on how to find this out with persistent undo
>
> enabled?
>

Yes, it's actually easier now!

Just do:

:earlier 1f

This will undo to the point of your last save. If you do it again, it will undo to the save before that. :later 1f will go in the other direction.

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

Vim variables not being created.

Hi,

Im new to Vim scripting.

Im using a ftplugin from vimscripts.org and im getting a error E121 saying the variable is undefined.

From my understanding any variables with scope w: or b: or l: or s: are not being created in my Gvim editor.

I tried typing :let to see list of variables declared and i find, the variables declared in my script are not being listed or created.

please help me in understanding..

ps: Im using Gvim version 703 on linux machine.

Thanks in advance
sai

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

Tuesday, October 29, 2013

Re: Passing " &> " shell-command string to shell

On Tuesday, October 29, 2013 2:59:44 PM UTC-4, AlmostSurely wrote:
> On Tuesday, October 29, 2013 11:47:32 AM UTC-4, Gary Johnson wrote:
> > On 2013-10-29, AlmostSurely wrote:
> >
> > > On Tuesday, October 29, 2013 2:15:56 AM UTC-4, Gary Johnson wrote:
> >
> > > > On 2013-10-28, AlmostSurely wrote:
> >
> > > > > Hi Gary, this is with Vim 7.4 with spf13, xterm-256color, on Ubuntu 13.10.
> >
> > > > >
> >
> > > > > I've been playing around with it and changing the function to:
> >
> > > > > ==========================================
> >
> > > > > function! Compile()
> >
> > > > > :let cmd_string = "g++ -std=c++11 " . expand("%") . ' \&\> ' . expand("%:r") . ".log"
> >
> > > > > :execute "!echo " . cmd_string
> >
> > > > > :execute "!" . cmd_string
> >
> > > > > endfunction
> >
> > > > > ==========================================
> >
> > > > >
> >
> > > > > Produces output:
> >
> > > > > ==========================================
> >
> > > > > g++ -std=c++11 file.cpp &> file.log
> >
> > > > >
> >
> > > > > Press ENTER or type command to continue
> >
> > > > > g++: error: &>: No such file or directory
> >
> > > > > g++: error: file.log: No such file or directory
> >
> > > > >
> >
> > > > > shell returned 1
> >
> > > > >
> >
> > > > > Press ENTER or type command to continue
> >
> > > > > ==========================================
> >
> > > > >
> >
>
> > > > > But using the function in the OP does not produce the &> file.log on my machine even... Any ideas?
> >
> > > >
> >
> > > > Quoting the &> as you did (\&\>) removes the special meaning of
> >
> > > > those characters to the shell, so the shell passes them to g++ which
> >
> > > > sees them as a file name. Also, without the &> redirection, the
> >
> > > > shell also sees file.log as an argument to be passed to g++ and g++
> >
> > > > can't find that file, either.
> >
> > > >
> >
> > > > If I remove that quoting from &> so that the :let command in that
> >
> > > > function becomes
> >
> > > >
> >
> > > > :let cmd_string = "g++ -std=c++11 " . expand("%") . ' &> ' . expand("%:r") . ".log"
> >
> > > >
> >
> > > > then create an empty file.cpp, open it in vim, source the Compile()
> >
> > > > function and execute
> >
> > > >
> >
> > > > :call Compile()
> >
> > > >
> >
> > > > I get an output of
> >
> > > >
> >
> > > > :!echo g++ -std=c++11 file.cpp &> file.log
> >
> > > > :!g++ -std=c++11 file.cpp &> file.log
> >
> > > >
> >
> > > > shell returned 1
> >
> > > >
> >
> > > > Press ENTER or type command to continue
> >
> > > >
> >
> > > > and file.log contains
> >
> > > >
> >
> > > > cc1plus: error: unrecognized command line option "-std=c++11"
> >
> > > >
> >
> > > > (I must have an old version of gcc.) If I use the function from the
> >
> > > > OP, with the added let, I get the same error message in file.log.
> >
> > > >
> >
> > > > Nothing is coming to mind as a reason for it behaving differently
> >
> > > > for you. You mentioned that you use spf13. Have you tried your
> >
> > > > function alone, without your ~/.vimrc or any plugins, that is,
> >
> > > > started as
> >
> > > >
> >
> > > > vim -N -u NONE
> >
> > > >
> >
> > > > ?
> >
> > > >
> >
> > > > Regards,
> >
> > > > Gary
> >
> > >
> >
> > > Good morning Gary. Yep, seems like it works when launched with,
> >
> > >
> >
> > > $ vim -u NONE file.cpp
> >
> > >
> >
> > > So the spf13's .vimrc seems to be conflicting somehow...
> >
> > > Unfortunately though, it's 1100+ lines of code... Any ideas what
> >
> > > kind of variables/commands I should investigate in the .vimrc?
> >
> > > I'll start a bug report on Steve Francia's github
> >
> > > (https://github.com/spf13/spf13-vim). Thanks!
> >
> >
> >
> > Good Morning,
> >
> >
> >
> > The first place I would look would be under
> >
> >
> >
> > :options
> >
> >
> >
> > in section 22, "executing external commands". You could look at
> >
> >
> >
> > :help 'shell'
> >
> >
> >
> > at the same time and compare the default values shown there for
> >
> > 'shell' and the other shell- options with the actual values shown on
> >
> > the :options page.
> >
> >
> >
> > If that doesn't reveal anything, I would start vim as
> >
> >
> >
> > vim --noplugin
> >
> >
> >
> > to see whether I should concentrate on my plugins or on my ~/.vimrc.
> >
> > Then I would do a binary search or bisection of the plugin files or
> >
> > ~/.vimrc to find the offending file/line.
> >
> >
> >
> > Sorry I can't think of anything less tedious.
> >
> >
> >
> > Regards,
> >
> > Gary
>
> Thanks for the help - gonna do some more probing tonight.

Ok, turns out there was a line:

set shell=/bin/sh

Which I changed to:

set shell=/bin/bash

And it works now. 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/groups/opt_out.

Re: Passing " &> " shell-command string to shell

On Tuesday, October 29, 2013 11:47:32 AM UTC-4, Gary Johnson wrote:
> On 2013-10-29, AlmostSurely wrote:
>
> > On Tuesday, October 29, 2013 2:15:56 AM UTC-4, Gary Johnson wrote:
>
> > > On 2013-10-28, AlmostSurely wrote:
>
> > > > Hi Gary, this is with Vim 7.4 with spf13, xterm-256color, on Ubuntu 13.10.
>
> > > >
>
> > > > I've been playing around with it and changing the function to:
>
> > > > ==========================================
>
> > > > function! Compile()
>
> > > > :let cmd_string = "g++ -std=c++11 " . expand("%") . ' \&\> ' . expand("%:r") . ".log"
>
> > > > :execute "!echo " . cmd_string
>
> > > > :execute "!" . cmd_string
>
> > > > endfunction
>
> > > > ==========================================
>
> > > >
>
> > > > Produces output:
>
> > > > ==========================================
>
> > > > g++ -std=c++11 file.cpp &> file.log
>
> > > >
>
> > > > Press ENTER or type command to continue
>
> > > > g++: error: &>: No such file or directory
>
> > > > g++: error: file.log: No such file or directory
>
> > > >
>
> > > > shell returned 1
>
> > > >
>
> > > > Press ENTER or type command to continue
>
> > > > ==========================================
>
> > > >
>

> > > > But using the function in the OP does not produce the &> file.log on my machine even... Any ideas?
>
> > >
>
> > > Quoting the &> as you did (\&\>) removes the special meaning of
>
> > > those characters to the shell, so the shell passes them to g++ which
>
> > > sees them as a file name. Also, without the &> redirection, the
>
> > > shell also sees file.log as an argument to be passed to g++ and g++
>
> > > can't find that file, either.
>
> > >
>
> > > If I remove that quoting from &> so that the :let command in that
>
> > > function becomes
>
> > >
>
> > > :let cmd_string = "g++ -std=c++11 " . expand("%") . ' &> ' . expand("%:r") . ".log"
>
> > >
>
> > > then create an empty file.cpp, open it in vim, source the Compile()
>
> > > function and execute
>
> > >
>
> > > :call Compile()
>
> > >
>
> > > I get an output of
>
> > >
>
> > > :!echo g++ -std=c++11 file.cpp &> file.log
>
> > > :!g++ -std=c++11 file.cpp &> file.log
>
> > >
>
> > > shell returned 1
>
> > >
>
> > > Press ENTER or type command to continue
>
> > >
>
> > > and file.log contains
>
> > >
>
> > > cc1plus: error: unrecognized command line option "-std=c++11"
>
> > >
>
> > > (I must have an old version of gcc.) If I use the function from the
>
> > > OP, with the added let, I get the same error message in file.log.
>
> > >
>
> > > Nothing is coming to mind as a reason for it behaving differently
>
> > > for you. You mentioned that you use spf13. Have you tried your
>
> > > function alone, without your ~/.vimrc or any plugins, that is,
>
> > > started as
>
> > >
>
> > > vim -N -u NONE
>
> > >
>
> > > ?
>
> > >
>
> > > Regards,
>
> > > Gary
>
> >
>
> > Good morning Gary. Yep, seems like it works when launched with,
>
> >
>
> > $ vim -u NONE file.cpp
>
> >
>
> > So the spf13's .vimrc seems to be conflicting somehow...
>
> > Unfortunately though, it's 1100+ lines of code... Any ideas what
>
> > kind of variables/commands I should investigate in the .vimrc?
>
> > I'll start a bug report on Steve Francia's github
>
> > (https://github.com/spf13/spf13-vim). Thanks!
>
>
>
> Good Morning,
>
>
>
> The first place I would look would be under
>
>
>
> :options
>
>
>
> in section 22, "executing external commands". You could look at
>
>
>
> :help 'shell'
>
>
>
> at the same time and compare the default values shown there for
>
> 'shell' and the other shell- options with the actual values shown on
>
> the :options page.
>
>
>
> If that doesn't reveal anything, I would start vim as
>
>
>
> vim --noplugin
>
>
>
> to see whether I should concentrate on my plugins or on my ~/.vimrc.
>
> Then I would do a binary search or bisection of the plugin files or
>
> ~/.vimrc to find the offending file/line.
>
>
>
> Sorry I can't think of anything less tedious.
>
>
>
> Regards,
>
> Gary

Thanks for the help - gonna do some more probing tonight.

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

Re: Simplified logo concept

On Oct 29, 2013, at 8:42 AM, Erik Christiansen <dvalin@internode.on.net> wrote:

> Sorry, but the proposed "new" icons seem a great step backwards, in
> every regard. (You'll have to judge whether that's 2c worth, or you want
> some money back.)

I am probably not the best judge of the direction in which any given icon is taking steps but I do like the (green!) "Icons" in that attachment at http://article.gmane.org/gmane.editors.vim/112613 and fail to see how they are not either modern or elegant (regarding whether they are "crisp": that first-linked logo -- the current one, if I am not mistaken -- is an SVG, so...).

Ben

--
b

Re: Passing " &> " shell-command string to shell

On 2013-10-29, AlmostSurely wrote:
> On Tuesday, October 29, 2013 2:15:56 AM UTC-4, Gary Johnson wrote:
> > On 2013-10-28, AlmostSurely wrote:
> > > Hi Gary, this is with Vim 7.4 with spf13, xterm-256color, on Ubuntu 13.10.
> > >
> > > I've been playing around with it and changing the function to:
> > > ==========================================
> > > function! Compile()
> > > :let cmd_string = "g++ -std=c++11 " . expand("%") . ' \&\> ' . expand("%:r") . ".log"
> > > :execute "!echo " . cmd_string
> > > :execute "!" . cmd_string
> > > endfunction
> > > ==========================================
> > >
> > > Produces output:
> > > ==========================================
> > > g++ -std=c++11 file.cpp &> file.log
> > >
> > > Press ENTER or type command to continue
> > > g++: error: &>: No such file or directory
> > > g++: error: file.log: No such file or directory
> > >
> > > shell returned 1
> > >
> > > Press ENTER or type command to continue
> > > ==========================================
> > >
> > > But using the function in the OP does not produce the &> file.log on my machine even... Any ideas?
> >
> > Quoting the &> as you did (\&\>) removes the special meaning of
> > those characters to the shell, so the shell passes them to g++ which
> > sees them as a file name. Also, without the &> redirection, the
> > shell also sees file.log as an argument to be passed to g++ and g++
> > can't find that file, either.
> >
> > If I remove that quoting from &> so that the :let command in that
> > function becomes
> >
> > :let cmd_string = "g++ -std=c++11 " . expand("%") . ' &> ' . expand("%:r") . ".log"
> >
> > then create an empty file.cpp, open it in vim, source the Compile()
> > function and execute
> >
> > :call Compile()
> >
> > I get an output of
> >
> > :!echo g++ -std=c++11 file.cpp &> file.log
> > :!g++ -std=c++11 file.cpp &> file.log
> >
> > shell returned 1
> >
> > Press ENTER or type command to continue
> >
> > and file.log contains
> >
> > cc1plus: error: unrecognized command line option "-std=c++11"
> >
> > (I must have an old version of gcc.) If I use the function from the
> > OP, with the added let, I get the same error message in file.log.
> >
> > Nothing is coming to mind as a reason for it behaving differently
> > for you. You mentioned that you use spf13. Have you tried your
> > function alone, without your ~/.vimrc or any plugins, that is,
> > started as
> >
> > vim -N -u NONE
> >
> > ?
> >
> > Regards,
> > Gary
>
> Good morning Gary. Yep, seems like it works when launched with,
>
> $ vim -u NONE file.cpp
>
> So the spf13's .vimrc seems to be conflicting somehow...
> Unfortunately though, it's 1100+ lines of code... Any ideas what
> kind of variables/commands I should investigate in the .vimrc?
> I'll start a bug report on Steve Francia's github
> (https://github.com/spf13/spf13-vim). Thanks!

Good Morning,

The first place I would look would be under

:options

in section 22, "executing external commands". You could look at

:help 'shell'

at the same time and compare the default values shown there for
'shell' and the other shell- options with the actual values shown on
the :options page.

If that doesn't reveal anything, I would start vim as

vim --noplugin

to see whether I should concentrate on my plugins or on my ~/.vimrc.
Then I would do a binary search or bisection of the plugin files or
~/.vimrc to find the offending file/line.

Sorry I can't think of anything less tedious.

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

Re: Passing " &> " shell-command string to shell

On Tuesday, October 29, 2013 2:15:56 AM UTC-4, Gary Johnson wrote:
> On 2013-10-28, AlmostSurely wrote:
>
> > On Monday, October 28, 2013 3:15:33 PM UTC-4, Gary Johnson wrote:
>
> > > On 2013-10-28, AlmostSurely wrote:
>
> > > > On Monday, October 28, 2013 2:06:11 PM UTC-4, AlmostSurely wrote:
>
> > > > > Consider the following function,
>
> > > > >
>
> > > > > function! Compile()
>
> > > > > :cmd_string = "g++ -std=c++11 " . expand("%") . " &> " . expand("%:r") . ".log"
>
> > > > > :execute "silent !" . cmd_string
>
> > > > > endfunction
>
> > > > >
>
> > > > > The simple goal is to compile with g++, writing any compiler output to a log file.
>
> > > > > I'm having trouble passing the " &> " term to the shell.
>
> > > > > Suppose % expands to file.cpp, then adding the line,
>
> > > > >
>
> > > > > :execute "!echo " . cmd_string
>
> > > > >
>
> > > > > Produces:
>
> > > > >
>
> > > > > g++ -std=c++11 file.cpp
>
> > > > >
>
> > > > > So the " &> " doesn't even make it to the shell. Any help is much appreciated.
>
> > >
>
> > > :execute "!echo " . cmd_string
>
> > >
>
> > > evaluates to
>
> > >
>
> > > :!echo g++ -std=c++11 file.cpp &> file.log
>
> > >
>
> > > which echoes "g++ -std=c++11 file.cpp" to file.log.
>
> > >
>
> > > I verified that result using Vim 7.4.52 started as "vim -N -u NONE
>
> > > file.cpp" on a system running Fedora 11.
>
> > >
>
> > > So it works as expected for me.
>
> > >
>
> > > Regards,
>
> > > Gary
>
> >
>
> > Hi Gary, this is with Vim 7.4 with spf13, xterm-256color, on Ubuntu 13.10.
>
> >
>
> > I've been playing around with it and changing the function to:
>
> > ==========================================
>
> > function! Compile()
>
> > :let cmd_string = "g++ -std=c++11 " . expand("%") . ' \&\> ' . expand("%:r") . ".log"
>
> > :execute "!echo " . cmd_string
>
> > :execute "!" . cmd_string
>
> > endfunction
>
> > ==========================================
>
> >
>
> > Produces output:
>
> > ==========================================
>
> > g++ -std=c++11 file.cpp &> file.log
>
> >
>
> > Press ENTER or type command to continue
>
> > g++: error: &>: No such file or directory
>
> > g++: error: file.log: No such file or directory
>
> >
>
> > shell returned 1
>
> >
>
> > Press ENTER or type command to continue
>
> > ==========================================
>
> >
>
> > But using the function in the OP does not produce the &> file.log on my machine even... Any ideas?
>
>
>
> Quoting the &> as you did (\&\>) removes the special meaning of
>
> those characters to the shell, so the shell passes them to g++ which
>
> sees them as a file name. Also, without the &> redirection, the
>
> shell also sees file.log as an argument to be passed to g++ and g++
>
> can't find that file, either.
>
>
>
> If I remove that quoting from &> so that the :let command in that
>
> function becomes
>
>
>
> :let cmd_string = "g++ -std=c++11 " . expand("%") . ' &> ' . expand("%:r") . ".log"
>
>
>
> then create an empty file.cpp, open it in vim, source the Compile()
>
> function and execute
>
>
>
> :call Compile()
>
>
>
> I get an output of
>
>
>
> :!echo g++ -std=c++11 file.cpp &> file.log
>
> :!g++ -std=c++11 file.cpp &> file.log
>
>
>
> shell returned 1
>
>
>
> Press ENTER or type command to continue
>
>
>
> and file.log contains
>
>
>
> cc1plus: error: unrecognized command line option "-std=c++11"
>
>
>
> (I must have an old version of gcc.) If I use the function from the
>
> OP, with the added let, I get the same error message in file.log.
>
>
>
> Nothing is coming to mind as a reason for it behaving differently
>
> for you. You mentioned that you use spf13. Have you tried your
>
> function alone, without your ~/.vimrc or any plugins, that is,
>
> started as
>
>
>
> vim -N -u NONE
>
>
>
> ?
>
>
>
> Regards,
> NONE
> Gary

Good morning Gary. Yep, seems like it works when launched with,

$ vim -u NONE file.cpp

So the spf13's .vimrc seems to be conflicting somehow... Unfortunately though, it's 1100+ lines of code... Any ideas what kind of variables/commands I should investigate in the .vimrc? I'll start a bug report on Steve Francia's github (https://github.com/spf13/spf13-vim). 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/groups/opt_out.