Sunday, January 31, 2010

Re: gvim window size on Windows

On 01/02/10 06:03, Gene Kwiecinski wrote:
>> Is it possible to instruct gvim to open in full size
>> (whole screen) instead of a quarter of the screen size???
>
> Ancient tip that's been done to death, no?
>
> Set your rows/cols to 9999 or something huge, should max out to the actual screen dimensions. Or there's the simalt trick to maXimise it, as if you typed alt-space/x.
>
> Either one worx.
>

The simalt trick is locale-dependent, since the key for Maximize is not
X in every menu language. In addition, it is win32-only (if someday you
migrate to Linux it will stop working). OTOH,

:set lines=999 columns=999

(in your gvimrc, or at the GUIEnter event, or bracketed by :if
has('gui_running') in your vimrc) should work on all systems and
languages. It should appear _after_ you set the 'guifont', since
changing the font may change the size of the character cell.

Best regards,
Tony.
--
Watson's Law:
The reliability of machinery is inversely proportional to the
number and significance of any persons watching it.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Selection problem with mouse

Hi
at work I am using gvim on Windows.
When I want to select something using Mouse, the area selected is highlighted.But When I release the button, the area disappears at once?my "slm" is "mouse,key". Thanks.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: gvim window size on Windows

>  at work I am using gvim on Windows.
>
>  Is it possible to instruct gvim to open in full size
>  (whole screen) instead of a quarter of the screen size???
>
>  I am tired of clicking the title bar each time I start
>  gvim...

If you are opening gvim from shortcut then right click on the shortcut
and click on properties and then in Run field select Maximized (in
drop down menu). I hope this solves your purpose.

Regards,
Kkde

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

RE: gvim window size on Windows

>Is it possible to instruct gvim to open in full size
>(whole screen) instead of a quarter of the screen size???

Ancient tip that's been done to death, no?

Set your rows/cols to 9999 or something huge, should max out to the actual screen dimensions. Or there's the simalt trick to maXimise it, as if you typed alt-space/x.

Either one worx.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

gvim window size on Windows

Hi,

at work I am using gvim on Windows.

Is it possible to instruct gvim to open in full size
(whole screen) instead of a quarter of the screen size???

I am tired of clicking the title bar each time I start
gvim...

Thank you very much for any help in advance! :)

Have a nice week!
Best regards,
mcc


--
Please don't send me any Word- or Powerpoint-Attachments
unless it's absolutely neccessary. - Send simply Text.
See http://www.gnu.org/philosophy/no-word-attachments.html
In a world without fences and walls nobody needs gates and windows.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

ANN: YankRing 10.0

YankRing.vim : Maintains a history of previous yanks, changes and deletes
http://www.vim.org/scripts/script.php?script_id=1234

What does it do?

Allows you to retrieve previous yanks, deletes and changed text and
cycle through them choosing which item you need. It also works across
Vim instances so they all see the same history. Useful for sharing
text across instances, including when using Screen in *nix.

Thanks for everyone's feedback so far.
If you do try the plugin and find things that bother you, please send
me an email.


What is new?

NF: Change the buffer name to [YankRing] to resemble other non-user buffers.

NF: Added g:yankring_min_element_length which can prevent items from
being added to the YankRing if they are too small. For example,
single character deletes (Vedran M).

BF: When shifting focus back to Vim, the YankRing may incorrectly
report: "YR:Failed to change to the yankring buffer, please contact
author".

BF: When entering Vim for the first time and hitting "p" nothing was
pasted (Mark Huiskes).

BF: When entering Vim for the first time and the
yankring_clipboard_monitor = 1, the clipboard entry was not
automatically added to the yankring.

BF: When overriding the default and setting
g:yankring_window_use_bottom = 0, the YankRing would report the error
(Sergey Khorev): E21: Cannot make changes, 'modifiable' is off


As usual, feedback good and bad is always welcome.


Enjoy.
Dave

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: [CURIOUSITY] am i using

Raúl Núñez de Arenas Coronado 写道:
> Saluton pansz :)
> pansz <p...@routon.com> skribis:
>> open-source software != free-as-in-freedom software.
>> Vim is open-source, but it is not free-as-in-freedom software.
> I don't want to start a flamewar on this issue

There won't be a flamewar on this issue: I'm just saying that some
distribution developers choose not to include vim by default and the
freedom is their reason.

I don't care whether vim should be include in a particular distribution
or not. Because I always compile vim from svn, which is far more useful
than distribution-specific versions.

IMO most serious vim users should compile their own vim. Only casual
users should rely on distribution-specific version.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Commnad over a window

hi,
if I have multiple windows. How can I apply a command on a specified
window without having to move to this?
example: g/text/d only in the first window

the same question in buffers case.

Many thanks.
--
JuanPablo

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: New Vim plugin system (automatic installation of plugins)

Hi @ll.

There are some news:

vim-addon-manager supports marking addons as deprecated.

So if you know some plugins which should not be used because they are
superseded by another package I'd like to ask you telling me about them.

By the way does someone has a script which uploads new versions of
scripts to www.vim.org automatically?

Marc Weber

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Windows gVim cannot read Chinese from clipboard created in Cygwin vim

Further investigation shows

(1) from console vim, we can send kind of "binary" version of content
to clipboard by:
:%y|call system('/bin/putclip', @@)

(2) from gVim, we can "correct" the clipboard contents by:
:let @+=system('/bin/getclip')
(But we suffer a flash DOS box on the status line.)

(3) However, to "communicate" between console vim and gVim on the same
Windows box, it is easy to do write/read a temp file. CJK is never
garbled through "write/read" text file.

(4) It seems not possible to send readable CJK to Windows Clipboard
from console vim.

(5) Searching "clipboard" on this group showed many relating
discussions. One interesting one is the #13 "Console cygwin Vim
using win32 clipboard" on http://groups.google.com/group/vim_dev/web/vim-patches
It looks like that patch can make @+ register available for console
vim. If that is the case, the patch should be included to the official
distribution.


Thanks

Sean

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Control-

On Sun, 31 Jan 2010, Benjamin R. Haskell wrote:

> On Sun, 31 Jan 2010, Gary Johnson wrote:
>
> > [...]
> >
> > That suggests to me that vim is properly configuring itself to
> > accept the escape sequences for those keys from both terminal types,
> > but that your mlterm is emitting different sequences from the ones
> > that vim expects from an mlterm. Try this. Open a new buffer and
> > enter insert mode. Then type Ctrl-V followed by Ctrl-Left. Type
> > Enter, then Ctrl-V followed by Ctrl-Right. What do you see?
> >
>
> [...]
>
> I found those by using 'zsh' running under 'mlterm' via:
>
> print $terminfo[smkx] ; cat > /dev/null ; print $terminfo[rmkx]

But, I could just as well have read Gary's suggestion more closely and
typed *Ctrl-V followed by* the keys in Vim insert mode. Oops. :-)

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Control-

On Sun, 31 Jan 2010, Benjamin R. Haskell wrote:

> On Sun, 31 Jan 2010, Gary Johnson wrote:
>
> > [...]
> >
> > That suggests to me that vim is properly configuring itself to
> > accept the escape sequences for those keys from both terminal types,
> > but that your mlterm is emitting different sequences from the ones
> > that vim expects from an mlterm. Try this. Open a new buffer and
> > enter insert mode. Then type Ctrl-V followed by Ctrl-Left. Type
> > Enter, then Ctrl-V followed by Ctrl-Right. What do you see?
> >
>
> [...]
>
> I found those by using 'zsh' running under 'mlterm' via:
>
> print $terminfo[smkx] ; cat > /dev/null ; print $terminfo[rmkx]

But, I could just as well have read Gary's suggestion more closely and
typed *Ctrl-V followed by* the keys in Vim insert mode. Oops. :-)

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Control-

On Sun, 31 Jan 2010, Gary Johnson wrote:

> On 2010-01-30, Paul wrote:
> > On Tue, Jan 26, 2010 at 11:35:08AM -0800, Gary Johnson wrote:
> > >One solution is to set the value of TERM to one that vim recognizes
> > >and whose terminfo database accurately reflects the capabilities of
> > >your terminal. I think the ones vim recognizes are:
> > >
> > > xterm
> > > nxterm
> > > kterm
> > > mlterm
> > > rxvt
> >
> > I'm using mlterm, but XTERM is set to 'xterm'. When I set it to
> > 'mlterm', I get the same behaviour. It works when I run vim from
> > xterm, though, both when TERM is 'xterm' and 'mlterm'.
>
> I assume that "XTERM" is a typo and that you meant "TERM".
>
> > >Another solution would be to map the sequences your terminal emits
> > >to the <C-Left> and <C-Right> key codes, e.g.,
> > >
> > > :cmap <Esc>[1;5D <C-Left>
> > > :cmap <Esc>[1;5C <C-Right>
> >
> > I tried it but it didn't work - same behaviour :(
>
> That suggests to me that vim is properly configuring itself to accept
> the escape sequences for those keys from both terminal types, but that
> your mlterm is emitting different sequences from the ones that vim
> expects from an mlterm. Try this. Open a new buffer and enter insert
> mode. Then type Ctrl-V followed by Ctrl-Left. Type Enter, then
> Ctrl-V followed by Ctrl-Right. What do you see?
>

There was a similar thread recently on the Zsh list about the 'Home' and
'End' keys. If I'm not mistaken, Vim puts terminals into 'application'
mode, where, in mlterm, the sequences are:

(bare) (Ctrl+)
Up ^[OA ^[O1;5A
Down ^[OB ^[O1;5B
Right ^[OC ^[O1;5C
Left ^[OD ^[O1;5D
O = capital o, not zero

I found those by using 'zsh' running under 'mlterm' via:

print $terminfo[smkx] ; cat > /dev/null ; print $terminfo[rmkx]

(Without the 'smkx'/'rmkx' enter- and leave- keyboard_transmit-mode, it
emits XTerm-like sequences:)

(bare) (Ctrl+)
Up ^[[A ^[[1;5A
Down ^[[B ^[[1;5B
Right ^[[C ^[[1;5C
Left ^[[D ^[[1;5D

The upshot is that the Vim mappings the OP is looking for are:

:cmap <Esc>O1;5A <C-Up>
:cmap <Esc>O1;5B <C-Down>
:cmap <Esc>O1;5C <C-Right>
:cmap <Esc>O1;5D <C-Left>

(Then any <C-arrow> mappings should work.)

It may or may not matter, but I was using the correct TERM value
(TERM=mlterm).

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Control-

On 2010-01-30, Paul wrote:
> On Tue, Jan 26, 2010 at 11:35:08AM -0800, Gary Johnson wrote:
> >One solution is to set the value of TERM to one that vim recognizes
> >and whose terminfo database accurately reflects the capabilities of
> >your terminal. I think the ones vim recognizes are:
> >
> > xterm
> > nxterm
> > kterm
> > mlterm
> > rxvt
>
> I'm using mlterm, but XTERM is set to 'xterm'. When I set it to 'mlterm', I
> get the same behaviour. It works when I run vim from xterm, though, both
> when TERM is 'xterm' and 'mlterm'.

I assume that "XTERM" is a typo and that you meant "TERM".

> >Another solution would be to map the sequences your terminal emits
> >to the <C-Left> and <C-Right> key codes, e.g.,
> >
> > :cmap <Esc>[1;5D <C-Left>
> > :cmap <Esc>[1;5C <C-Right>
>
> I tried it but it didn't work - same behaviour :(

That suggests to me that vim is properly configuring itself to
accept the escape sequences for those keys from both terminal types,
but that your mlterm is emitting different sequences from the ones
that vim expects from an mlterm. Try this. Open a new buffer and
enter insert mode. Then type Ctrl-V followed by Ctrl-Left. Type
Enter, then Ctrl-V followed by Ctrl-Right. What do you see?

Regards,
Gary


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Single-column 'set'?

On Fri, 29 Jan 2010, Gary Johnson wrote:

> On 2010-01-29, Benjamin R. Haskell wrote:
> > I just managed to clobber one machine's ~/.vim.local directory
> > (where I keep machine-specific settings). Luckily I have an
> > instance of 'vim' still running with the old settings. Armed with
> > my recent ':redir @a' knowledge (thanks to Brett and wikia), I've
> > managed to save the settings I care about, via:
> >
> > :redir @a
> > :let
> > :set
> > :abbrev
> > :map
> > :redir END
> >
> > But, I was wondering: is there a way to get single-column output for
> > ':set'? The results I got were hard to 'diff'.
>
> You could use :mkvimrc.

Hmm. Cool. I don't really like the way it formats things (e.g.
literal ^V^P and ^V^[ where I'd written <C-P> and <ESC> in mappings)
(for compatibility, as explained by :help :mkvimrc). But, it did manage
to make me notice a couple things I'd missed in the first diffs.

--
Thanks,
Ben

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: concatenate with '.' or without

On 2010-01-30, Bee wrote:
> On Jan 29, 10:52 am, "Benjamin R. Haskell" <v...@benizi.com> wrote:
> > On Fri, 29 Jan 2010, Bee wrote:
> > > On Jan 29, 7:43 am, "Benjamin R. Haskell" <v...@benizi.com> wrote:
> > > > ...
> > > > :redir @a
> > > > ...
> > > How to save directly to a filename?
> > > [...]
> > > But this creates a file named savevimrc in $HOME
> > > redir > savevimrc
> > > How to expand savevimrc to the file name?
> > :exe "redir > " . savevimrc
>
> Will this always do the same?
> :exe "redir >" savevimrc

Yes.

> From what I have read '.' concatenates without adding spaces,
> whereas without using '.' a space will be added.

'.' is an expression operator and will concatenate two strings in a
context where an expression is allowed. Not having to use a '.'
between arguments of an exe command is a property of the exe
command, which concatenates all of its arguments with intervening
spaces.

> Is it just better to get the habit of using '.' ?

No, not if you're paying attention to the context in which you're
concatenating strings. I prefer not to use the '.' in exe arguments
if I can avoid it because it looks less cluttered.

Now that I look at them, the examples under ":help :exe" are
confusing. The first two examples include spaces after the executed
command names even though none are needed there.

Regards,
Gary


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Builing Vim on slack for console with clipboard enabled

* Tim Johnson <tim@johnsons-web.com> [100130 16:43]:
> * bill lam <cbill.lam@gmail.com> [100130 16:12]:
> > sab, 30 Jan 2010, Tim Johnson skribis:
> > > I could really use some tips on how to recompile with the following
> > > changes: +clipboard +xterm_clipboard, -python, -perl
> > >
> > > Thus far, I have not found invoking:
> > > ./configure --help
> > > sufficient to my inquiry.
> >
> > You can manually edit the file src/feature.h
> I'm looking at line number 1065 of that file and
> the following code snippet:
> /* Code follows */
> #ifdef FEAT_GUI
> # ifndef FEAT_CLIPBOARD
> # define FEAT_CLIPBOARD
> # ifndef FEAT_VISUAL
> # define FEAT_VISUAL
> # endif
> # endif
>

Re: Change vim/gvim colorschemes

How would I change this line:
let g:mycolors = split(globpath(&rtp,"**/colors/*.vim"),"\n")
to get only colorschemes from ~/.vim/colors/ instead of colorschemes
from every color directory in the runtimepath ?

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Vim, NERDtree and remote files editing

> Is there a way to use directly Vim to edit remote files (like in
> modern IDE)? And, more, is there a way to also use NERDtree to do
> that?

If you're using Linux or Mac you can mount FTP locations.
However you should either switch swap files off then or put them into a
different location.

Marc Weber

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Builing Vim on slack for console with clipboard enabled

On Sat, Jan 30, at 04:00 Tim Johnson wrote:
> I'm using vim 7.2 on Slackware 13.0 32-bit.
>
> This system has two 'vims': the gui version compiled as gvim and
> `vim' compiled without the gui. I would like to recompile the
> console `vim' with support for the clipboard and without the
> embedding of the perl and python interpreters, but with the option
> to embed the interperters if necessary.
[...]
> I could really use some tips on how to recompile with the following
> changes: +clipboard +xterm_clipboard, -python, -perl

The "+clipboard" is enabled, by using the "--with-x" configure switch,
or just by using "--with-features=huge" - vim then by default will link
against X libraries.
If you want to have "+clientserver" and "+clipboard" features, and you
don't want to build the Gui version (by default in Linux is the GTK+2),
you can use "--with-x --enable-gui=no".

Vim doesn't try (by default) to build the various interpreters
(including Perl and Python), unless you explicitly enable them during
configuration, by using the "--enable-perlinterp" or "--enable-pythoninterp"
configure switches.

So the following should work for you:

./configure --with-features=huge

I left out the --prefix switch; if you don't provide it, Vim installation
will be placed under the "/usr/local" hierarchy by default.

Regards,
Agathoklis.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Vim, NERDtree and remote files editing

On 13/12/09 09:53, caruso_g wrote:
> Hi,
> I am using Vim to edit files downloading them with a FTP application
> (Transmit) that just makes me choose "edit with" in is contextual
> menu. I also use the excellent NERDtree plugin to browse folders and
> files.
>
> Is there a way to use directly Vim to edit remote files (like in
> modern IDE)? And, more, is there a way to also use NERDtree to do
> that?
>
> Thank you all.
>

see :help pi_netrw.txt

For instance:

:view ftp://ftp.vim.org/pub/vim/patches/7.2/README

to see the latest "table of contents" of the patches for Vim 7.2.

Similarly, :e[dit]ing or :vie[w]ing a remote directory (with the ending
slash in the filename!) should display a directory listing.


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
252. You vote for foreign officials.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Differently colored folds in the same file

I believe the answer is no. You cannot have different colors for
different closed folds. All closed folds will have same color scheme.


Regards,
Kkde

On Jan 30, 10:29 pm, Viktor Rosenfeld <listuse...@googlemail.com>
wrote:
> Hi,
>
> is it possible to have two closed folds in the same file that use a
> different colorscheme?  How would I go about that?
>
> Background: I use TVO for outlining and would like to achive two things:
>
> - optionally: use the same color for opened and closed headlines, e.g.
>   red, green, blue depending on level
> - required: subdue folded text sections, e.g. use a light grey on white
>
> Thanks,
> Viktor

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Saturday, January 30, 2010

Re: filter output to scratch buffer

sab, 30 Jan 2010, bill lam skribis:
> ven, 29 Jan 2010, Bob Hiestand skribis:
> > On Thu, Jan 28, 2010 at 9:50 PM, bill lam <cbill.lam@gmail.com> wrote:
> > > I map F5 to search dictionary with
> > >
> > > nmap <F5> :!dict <cword> <CR>
> > >
> > > The output is quite long and also it may contain some info that I
> > > would like to copy.  Is it possible to redirect the output to a new
> > > scratch buffer?
> >
> > You could do something like the following:
> >
> > :nmap <F5> :let dictScratch=system('dict ' .
> > expand('<cword>'))<CR>:new<CR>:0put =dictScratch<CR>:set
> > buftype=nofile<CR>
>
> Thank you Bob, it works nicely.

That position at the bottom of buffer, I added an extra 0<CR> to bring
the cursor to the first line.

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Windows gVim cannot read Chinese from clipboard created in Cygwin vim

sab, 30 Jan 2010, Sean skribis:
> >> Or Did it work if pasting to notepad?
>
> No. Pasting to notepad is even worse, as it all ended up with one
> long line with the same garbled multi-bytes.

I suggest you to make sure those clip program support unicode first
and translate encoding if necessary before feeding them data.

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Windows gVim cannot read Chinese from clipboard created in Cygwin vim

>> Or Did it work if pasting to notepad?

No. Pasting to notepad is even worse, as it all ended up with one
long line with the same garbled multi-bytes.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Builing Vim on slack for console with clipboard enabled

* bill lam <cbill.lam@gmail.com> [100130 16:12]:
> sab, 30 Jan 2010, Tim Johnson skribis:
> > I could really use some tips on how to recompile with the following
> > changes: +clipboard +xterm_clipboard, -python, -perl
> >
> > Thus far, I have not found invoking:
> > ./configure --help
> > sufficient to my inquiry.
>
> You can manually edit the file src/feature.h
I'm looking at line number 1065 of that file and
the following code snippet:
/* Code follows */
#ifdef FEAT_GUI
# ifndef FEAT_CLIPBOARD
# define FEAT_CLIPBOARD
# ifndef FEAT_VISUAL
# define FEAT_VISUAL
# endif
# endif

Re: Builing Vim on slack for console with clipboard enabled

sab, 30 Jan 2010, Tim Johnson skribis:
> I could really use some tips on how to recompile with the following
> changes: +clipboard +xterm_clipboard, -python, -perl
>
> Thus far, I have not found invoking:
> ./configure --help
> sufficient to my inquiry.

You can manually edit the file src/feature.h

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Builing Vim on slack for console with clipboard enabled

I'm using vim 7.2 on Slackware 13.0 32-bit.

This system has two 'vims': the gui version compiled as gvim and
`vim' compiled without the gui. I would like to recompile the
console `vim' with support for the clipboard and without the
embedding of the perl and python interpreters, but with the option
to embed the interperters if necessary.
FYI: I've looked thru my vim scripts and don't believe that either
binary is needed.
Below is partial output from vim --version
"""
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Aug 24 2009 20:04:48)
Included patches: 1-245
Compiled by <volkerdi@slackware.com>
Huge version without GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset
+cindent
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info
+comments
+cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd
-ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
+find_in_path
+float +folding -footer +fork() +gettext -hangul_input +iconv
+insert_expand
+jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds
+localmap
+menu +mksession +modify_fname +mouse -mouseshape +mouse_dec
+mouse_gpm
-mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm
+multi_byte
+multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra +perl
+postscript
+printer +profile +python +quickfix +reltime +rightleft -ruby
+scrollbind
+signs +smartindent -sniff +statusline -sun_workshop +syntax
+tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse
+textobjects +title
-toolbar +user_commands +vertsplit +virtualedit +visual
+visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -X11
-xfontset -xim -xsmp
-xterm_clipboard -xterm_save
"""
I could really use some tips on how to recompile with the following
changes: +clipboard +xterm_clipboard, -python, -perl

Thus far, I have not found invoking:
./configure --help
sufficient to my inquiry.

thanks
--
Tim
tim@johnsons-web.com
http://www.akwebsoft.com

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Windows gVim cannot read Chinese from clipboard created in Cygwin vim

sab, 30 Jan 2010, Sean skribis:
> Option #1, using cygwin putclip:
> ------------------------------
> :%y|call system('putclip', @@)
> ------------------------------
>
> option #2, using clip from Windows
> ---------------------------
> :%y|call system('clip', @@)
> ---------------------------

Window system clipboard use utf16 encoding. Did you test these two
program 'putclip' and 'clip' if they accept utf8? Or Did it work if
pasting to notepad?

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Restoring contents

On Jan 29, 8:52 am, Tim Chase <v...@tim.thechases.com> wrote:
> Otherwise, consider it a lesson in typing what you mean.  Just
> like in any other program, if using the Quit option prompts you
> (which regularly using ":q" sans-exclamation-point would remind
> you, a good habit to acquire) to save and you decline (by
> specifying "!" in Vim), it's your own fault.
>

For this reason, I always use commands like :w and :qa without the
'!'. I have set the 'confirm' option, so that I am able to save and
continue if I want to but it won't silently erase hours of work.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Windows gVim cannot read Chinese from clipboard created in Cygwin vim

我把我的帖子翻译成英文,并上交国际组织:
http://groups.google.com/group/vim_use/browse_thread/thread/c01224df490d7495

让我们看看国际民间艺人的武林功夫如何。

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Windows gVim cannot read Chinese from clipboard created in Cygwin vim

On Windows, I have one single vimrc for both gVim and cygwin vim.
It works great, and both can input Chinese using VimIM plugin without
touching |+multi_byte_ime|.

The key vimrc setting to display Chinese are:

set enc=utf8 gfn=Courier_New:h12:w7 fencs=ucs-bom,utf8,chinese
set
gfw=NSimSun-18030,GulimChe,GungsuhChe,FangSong,MS_Mincho,SimHei

Now, open console vim, I can type Chinese at will: (correct Chinese
below)

沧海月明珠有泪
蓝田日暖玉生烟

The problem came in when I wanted to put the content to Windows system
clipboard.

Because console vim does not support @+ or @" register, I have to
use external programs. But that is not an issue as making system()
calls from console vim is a pleasant (sorry for gVim.exe).

Option #1, using cygwin putclip:
------------------------------
:%y|call system('putclip', @@)
------------------------------

option #2, using clip from Windows
---------------------------
:%y|call system('clip', @@)
---------------------------

Both above options worked in the way that the content (14 Chinese
characters) was put successfully in Windows clipboard.

However, when I opened gVim, and pasted from clipbard (:put *),
I found garbled characters:

From option #1, I got the following mess:
-------------------------------------
æ²§æµ·æœˆæ˜Žç  æœ‰æ³ª
è" ç"°æ—¥æš–玉ç"ŸçƒŸ
-------------------------------------

From option #2, I got the following mess:
-------------------------------------
沧海月明珠有泪
蓝田日暖玉生烟
-------------------------------------

Further investigation shows that the content in the Windows clipboard
is not lost.
I could get the original Chinese by the following steps using gVim:

(1) gVim vimrc
set enc=ansi gfn=Courier_New:h12:w7 fencs=ansi
(2) gVim
(3) :put *
(4) :wq myfile
(5) gVim vimrc
set enc=utf8 gfn=Courier_New:h12:w7 fencs=ucs-bom,utf8,chinese
(6) gVim
(7) :r myfile

I also searched wikia, but found nothing dealing with multi-bytes:
http://vim.wikia.com/wiki/Using_the_Windows_clipboard_in_Cygwin_Vim

It looks like the issue is ++enc=utf8 cannot "translate"/"detect"
clipboard content?

Any thing do I missed?


Thanks

Sean

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: SAR Limitation

On Wed, Jan 27, 2010 at 06:30:04AM -0800, Ben Fritz wrote:
>If you actually need to capture more than 9 groups, then no, it can't
>be done. You might be able to get around it with a nested substitute:
>
>:s/pattern1/\=substitute(submatch
>(1,2,3,...,9),'pattern2','replace','')/
>
>Your replace pattern can be built with submatch strings as well as \1
>through \9.

Looks too complicated already! I'll soldier on :)

--

.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Control-

On Tue, Jan 26, 2010 at 11:35:08AM -0800, Gary Johnson wrote:
>One solution is to set the value of TERM to one that vim recognizes
>and whose terminfo database accurately reflects the capabilities of
>your terminal. I think the ones vim recognizes are:
>
> xterm
> nxterm
> kterm
> mlterm
> rxvt

I'm using mlterm, but XTERM is set to 'xterm'. When I set it to 'mlterm', I get the same behaviour. It works when I run vim from xterm, though, both when TERM is 'xterm' and 'mlterm'.

>Another solution would be to map the sequences your terminal emits
>to the <C-Left> and <C-Right> key codes, e.g.,
>
> :cmap <Esc>[1;5D <C-Left>
> :cmap <Esc>[1;5C <C-Right>

I tried it but it didn't work - same behaviour :(

>> Also, I suppose there would be no way to make that work with standard
>> readline? :help readline just brings up stuff about the readline.vim syntax
>> file.
>
>Do you mean have Ctrl-Left and Ctrl-Right work at the shell prompt
>or do you mean have vim use readline? If you mean the latter, then
>no. For the former, see

The former. Oh well :)

--

.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Differently colored folds in the same file

Hi,

is it possible to have two closed folds in the same file that use a
different colorscheme? How would I go about that?

Background: I use TVO for outlining and would like to achive two things:

- optionally: use the same color for opened and closed headlines, e.g.
red, green, blue depending on level
- required: subdue folded text sections, e.g. use a light grey on white

Thanks,
Viktor

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

concatenate with '.' or without

On Jan 29, 10:52 am, "Benjamin R. Haskell" <v...@benizi.com> wrote:
> On Fri, 29 Jan 2010, Bee wrote:
> > On Jan 29, 7:43 am, "Benjamin R. Haskell" <v...@benizi.com> wrote:
> > > ...
> > > :redir @a
> > > ...
> > How to save directly to a filename?
> > [...]
> > But this creates a file named savevimrc in $HOME
> > redir > savevimrc
> > How to expand savevimrc to the file name?
> :exe "redir > " . savevimrc

Will this always do the same?
:exe "redir >" savevimrc

From what I have read '.' concatenates without adding spaces,
whereas without using '.' a space will be added.

Is it just better to get the habit of using '.' ?

-Bill

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Change vim/gvim colorschemes

On Jan 30, 1:15 pm, Athunye <athu...@gmail.com> wrote:
> On Jan 30, 11:52 am, Christian Brabandt <cbli...@256bit.org> wrote:
>
>
>
> > Hi Athunye!
>
> > On Fr, 29 Jan 2010, Athunye wrote:
>
> > > I was wondering about a possibility to get vim change colorschemes
> > > from time
> > > to time, Say, every 5 or 10 minutes (automatically). Of course the
> > > 'sleep' command won't help
> > > in this case.
>
> > > The script would read the contents of a directory with the
> > > colorschemes, or the colorscheme names
> > > would be placed in a list, or whatever.
> > > As I run GNU/Linux, I thought that perhaps some interaction with bash
> > > would help.
> > > Any ideas are appreciated.
>
> > let g:mycolors = split(globpath(&rtp,"**/colors/*.vim"),"\n")
> > "change every 5 ticks
> > let g:mytick   = 5
>
> > fun! s:ChangeColors()
> >     exe 'so ' . g:mycolors[localtime() % len(g:mycolors)]
> >     "unlet mycolors
> > endfun
>
> > aug MyColors
> >     au!
> >     au CursorHoldI,CursorHold * let g:mytick-=1 | if g:mytick<=0 | let g:mytick=5 | call s:ChangeColors() | endif
> > aug END
>
> > Mit freundlichen Gr en
> > Christian
> > --
> > Ich konnte mich nur an einen Mann binden, der dasselbe verabscheute
> > wie ich: die Rechte, die brave Gesinnung, die Religion.
> >                 -- Simone de Beauvoir ( ber Jean-Paul Sartre, 'Der Lauf der Dinge')
>
> Thank you guys for all the replays.
>
> I tried Chirstian Brabandt script, but did not manage to really figure
> out how to use it.
> I put the script in ~/.vim/plugin/ and ~/.vim/autoload/ and even tried
> sourcing it.
>
> I'm reading the help of the functions used in the script. Any further
> help on this would be appreciated.

Actually, it does work. I just changed mytick to a smaller number. It
was just taking long than I was expecting.
Thanks once more.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Change vim/gvim colorschemes

On Jan 30, 11:52 am, Christian Brabandt <cbli...@256bit.org> wrote:
> Hi Athunye!
>
> On Fr, 29 Jan 2010, Athunye wrote:
>
> > I was wondering about a possibility to get vim change colorschemes
> > from time
> > to time, Say, every 5 or 10 minutes (automatically). Of course the
> > 'sleep' command won't help
> > in this case.
>
> > The script would read the contents of a directory with the
> > colorschemes, or the colorscheme names
> > would be placed in a list, or whatever.
> > As I run GNU/Linux, I thought that perhaps some interaction with bash
> > would help.
> > Any ideas are appreciated.
>
> let g:mycolors = split(globpath(&rtp,"**/colors/*.vim"),"\n")
> "change every 5 ticks
> let g:mytick   = 5
>
> fun! s:ChangeColors()
>     exe 'so ' . g:mycolors[localtime() % len(g:mycolors)]
>     "unlet mycolors
> endfun
>
> aug MyColors
>     au!
>     au CursorHoldI,CursorHold * let g:mytick-=1 | if g:mytick<=0 | let g:mytick=5 | call s:ChangeColors() | endif
> aug END
>
> Mit freundlichen Gr en
> Christian
> --
> Ich konnte mich nur an einen Mann binden, der dasselbe verabscheute
> wie ich: die Rechte, die brave Gesinnung, die Religion.
>                 -- Simone de Beauvoir ( ber Jean-Paul Sartre, 'Der Lauf der Dinge')

Thank you guys for all the replays.

I tried Chirstian Brabandt script, but did not manage to really figure
out how to use it.
I put the script in ~/.vim/plugin/ and ~/.vim/autoload/ and even tried
sourcing it.

I'm reading the help of the functions used in the script. Any further
help on this would be appreciated.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Change vim/gvim colorschemes

Hi Athunye!

On Fr, 29 Jan 2010, Athunye wrote:

> I was wondering about a possibility to get vim change colorschemes
> from time
> to time, Say, every 5 or 10 minutes (automatically). Of course the
> 'sleep' command won't help
> in this case.
>
> The script would read the contents of a directory with the
> colorschemes, or the colorscheme names
> would be placed in a list, or whatever.
> As I run GNU/Linux, I thought that perhaps some interaction with bash
> would help.
> Any ideas are appreciated.

let g:mycolors = split(globpath(&rtp,"**/colors/*.vim"),"\n")
"change every 5 ticks
let g:mytick = 5

fun! s:ChangeColors()
exe 'so ' . g:mycolors[localtime() % len(g:mycolors)]
"unlet mycolors
endfun

aug MyColors
au!
au CursorHoldI,CursorHold * let g:mytick-=1 | if g:mytick<=0 | let g:mytick=5 | call s:ChangeColors() | endif
aug END


Mit freundlichen Grüßen
Christian
--
Ich konnte mich nur an einen Mann binden, der dasselbe verabscheute
wie ich: die Rechte, die brave Gesinnung, die Religion.
-- Simone de Beauvoir (über Jean-Paul Sartre, 'Der Lauf der Dinge')

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Garbled mail on list

Hi Tony!

On Sa, 30 Jan 2010, Tony Mechelynck wrote:

> It got garbled again. I had typed in UTF-8: ...mistyped [plus-minus] for
> [superscript-one]... and after the round-trip to you it comes back as:
> ...mistyped [a-ogonek] for [s-caron]...
>
> Confusion between Latin1 and Latin2 could have explained it, but my mail
> was sent to the list in UTF-8, and yours came back to me in UTF-8 (as
> shown by their respective Content-Type headers)... I wonder how your
> mutt is set up, or your Vim if you use that to edit mail.

Both are setup to use utf-8 when necessary. The mail was sent with
latin1 since all characters could be displayed using this encoding and
that is how the mail is shown in my sent mailbox.

Besides, this configuration works on many lists flawlessly and has been
tested to support utf-8 and latin1/9 encoding without problems on many
different occasions.

> AFAIK there's nothing in this footer which would explain "convert from
> UTF-8 to Latin1 then convert the same text from Latin2 to UTF-8".

Don't ask me, ask the guys at google. They mangle the mails and break
it.

regards,
Christian

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Garbled mail on list

On 30/01/10 09:53, Christian Brabandt wrote:
> Hi Tony!
>
> On Sa, 30 Jan 2010, Tony Mechelynck wrote:
>
>> I suppose that the OP mistyped ą for š, and that for some reason his
>> mailer or browser converted Latin1 (thinking that it was Latin2) to
>> UTF-8 (which is declared as the post's encoding in its Content-Type
>> header).
>
> As this happened to me too, I can assure you, I did not mistype it. They
> are saved alright in my outbox. Google groups must have scrambled it,
> possibly when adding it's list footer.
>
> regards,
> Christian
>

It got garbled again. I had typed in UTF-8: ...mistyped [plus-minus] for
[superscript-one]... and after the round-trip to you it comes back as:
...mistyped [a-ogonek] for [s-caron]...

Confusion between Latin1 and Latin2 could have explained it, but my mail
was sent to the list in UTF-8, and yours came back to me in UTF-8 (as
shown by their respective Content-Type headers)... I wonder how your
mutt is set up, or your Vim if you use that to edit mail.

AFAIK there's nothing in this footer which would explain "convert from
UTF-8 to Latin1 then convert the same text from Latin2 to UTF-8".

Best regards,
Tony.
--
A Plan for the Improvement of English Spelling
by Mark Twain

For example, in Year 1 that useless letter "c" would be dropped
to be replased either by "k" or "s", and likewise "x" would no longer
be part of the alphabet. The only kase in which "c" would be retained
would be the "ch" formation, which will be dealt with later. Year 2
might reform "w" spelling, so that "which" and "one" would take the
same konsonant, wile Year 3 might well abolish "y" replasing it with
"i" and Iear 4 might fiks the "g/j" anomali wonse and for all.
Jenerally, then, the improvement would kontinue iear bai iear
with Iear 5 doing awai with useless double konsonants, and Iears 6-12
or so modifaiing vowlz and the rimeining voist and unvoist konsonants.
Bai Iear 15 or sou, it wud fainali bi posibl tu meik ius ov thi
ridandant letez "c", "y" and "x" -- bai now jast a memori in the maindz
ov ould doderez -- tu riplais "ch", "sh", and "th" rispektivli.
Fainali, xen, aafte sam 20 iers ov orxogrefkl riform, wi wud
hev a lojikl, kohirnt speling in ius xrewawt xe Ingliy-spiking werld.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

More on WORD#[+args] and syntax file

Hi all,

I recently dropped a post titled "WORD # and syntax files", for help
about highlighting a WORD followed by some symbol.
The help I received, here and by direct mail, helped me in
understanding why I couldn't achieve the desired results, because the
formulation for selecting WORD# had been preceded by a similar request
through "syn keyword", and this covered the "syn match" I was
operating on WORD.

Just to be clear, this syntax file tries to emulate the DEC-10 BASIC
compiler syntax (1974). Now, what I did resolve (with your active
help) was for commands that accept a channel identifier, followed by
anything else; e.g.:

WRITE #1, A$
PRINT :3, A,B,C
INPUT 2, N$
READ :5, A$

the # symbol (that is not mandatory) means "sequential file", and
the : symbol (which must be written) is for random access files.

Now, in the DEC-10 BASIC, there are commands that don't accept
arguments after a channel identifier, but accept channel identifiers
as arguments:

RESTORE 2, #4, :5
RESTORE #2; 4, :5
RESTORE :3; :4, 3

The separator is a comma or a semicolon, the # (occasionally missing)
is for sequential, : is for random.

My purpose is to highlight the "RESTORE + channel" plus any other
channel arguments left, but leaving the separators (commas and
semicolons) not highlighted.

I tried, for RESTORE, with the following line:
syn match File "RESTORE\s*[#:]\s*\d\+[\s*[,;]\+\s*[#:]*\s*\d\+\s*]*"

that tries to grab RESTORE plus the first argument and then all other
arguments in turn (if any). But this doesn't work as expected, and
above all, with this model I get commas and semicolons highlighted.

Another model was to grab all arguments by their own with

syn match File "[#:]\d\+"

and RESTORE by its own, but this doesn't solve the fact that RESTORE 3
(perfectly legal, in BASIC) has a number as argument, that is not
highlighed (it should be written #3 for this). If I write

syn match File "[#:]*\d\+"

I of course get all numbers highlighted as well!

Any help? Any ideas?

Please, answer to tbin at libero dot it, if you want it, or directly
to this thread.

Thanks in advance, mates!

-- Antonio

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Garbled mail on list

Hi Tony!

On Sa, 30 Jan 2010, Tony Mechelynck wrote:

> I suppose that the OP mistyped ą for š, and that for some reason his
> mailer or browser converted Latin1 (thinking that it was Latin2) to
> UTF-8 (which is declared as the post's encoding in its Content-Type
> header).

As this happened to me too, I can assure you, I did not mistype it. They
are saved alright in my outbox. Google groups must have scrambled it,
possibly when adding it's list footer.

regards,
Christian

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: command works interactively but does not work in script

On 12/12/09 23:20, Uday K2 wrote:
> Hello,
>
> I am using VIM (version 7.1) on a SUN (UNIX) machine.
>
> The following command works when I type it interactively
> but fails when I keep it in a script and use vim -s option.
>
> The command is:
> :g/^{\s*$/normal ^maf{%mb:'a,'bs/,//g/^M
> [Please note that the ^M is actually Cntrl-M or "Enter" key
> which I got by typing Cntrl-V<Return>]
>
> The above command typed interactively works perfectly.
>
> All the command is trying to do is delete all the commas
> within all the "{}" blocks of a given file. Other commas have to
> be kept. Just commas with in the "{}" blocks need to be
> deleted.
>
> When I store the above command in a script file, and use
> vim -s<script> <datafile>
> command, it does not do anything. It just searches for the
> grepped pattern. That is all.
>
> Also, is there any way to run VIM scripts in a non-interactive
> or batch mode. Please let me know.
>
> Thanks,
> Uday K2
>

In addition to :help -S which corresponds to what Ben said, see also
:help -s-ex which discusses the -es (or -e -s) switch to start Vim in
batch mode.

Best regards,
Tony.
--
Isn't it strange that the same people that laugh at gypsy fortune
tellers take economists seriously?

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Friday, January 29, 2010

Re: Garbled mail on list

On 17/12/09 04:38, John Little wrote:
> Hi
>> | ą cursor in paragraph 1 - delete paragraph 1
>> | ˛ go to start of paragraph 3
>> | ł select paragraph 3 and replace by paragraph 1
>
> Those were garbled in google groups in Firefox. ą = latin small a
> with ogonek, ˛ = ogonek, ł = small l with stroke, all Polish letters.

also (and the same way) when reading list mail as mail on Gmail's POP
server in SeaMonkey (version 2.0.3pre if it makes any difference)

>
>> mailer got to see our superscripts ¹, ², ³ in my case, the way they're
>
> Those are fine.

ditto.

>
> Cheers
>

ą U+0105 LATIN SMALL LETTER A WITH OGONEK
˛ U+02DB SPACING OGONEK
ł U+0142 LATIN SMALL LETTER L WITH STROKE

In ISO-8859-2 ("Central European"), these are respectively encoded as

0xB1, which is plus-minus in Latin1
0xB2, which is superscript-2 in Latin1
0xB3, which is superscript-3 in Latin1

These Latin1 (aka ISO-8859-1) characters are the same in Windows-1252
and also in Latin9 aka ISO-8859-15. All three are "Western" encodings.
None of these bytes is valid in MacRoman AFAIK.

Superscript-1 is 0xB9 in Latin1 (or U+00B9 in Unicode); 0xB9 means š in
ISO-8859-2 (LATIN SMALL LETTER S WITH CARON, which in Unicode would be
U+0161).

I suppose that the OP mistyped ± for ¹, and that for some reason his
mailer or browser converted Latin1 (thinking that it was Latin2) to
UTF-8 (which is declared as the post's encoding in its Content-Type header).


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
251. You've never seen your closest friends who usually live WAY too far
away.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: how to match a "," that IS NOT in comment

On 15/12/09 03:15, aj3423 wrote:
>
> Thanks for your reply. I'm trying to write a vim plugin that checks trailing
> comma for .js file, I'm using "match Error" when the buffer saves, but there
> is another function in the plugin:
> :vimgrep /the regex/ **/*.js
>
> so there should be a regex to fit these 2 functions.
>
> //Brs

The problem here is that there can be any number of lines between /* and
*/ -- for example, you might have /* at the start of line 1, then a
copyright statement and license agreement (in lawyers' English with
plenty of commas in it), then the closing */ on line 450; or the
description of a function (in programmers' English this time, but again
with plenty of commas in it), again occupying any number of lines with
/* on the first of them and */ on the last.

I don't see how to search any number of lines backwards and forwards for
/* and */ (aven assuming that you won't have such niceties as

function(arg1, "/*", arg2, "*/", arg3)

where the commas around arg2 are *not* in a comment), unless your script
can make good use of syntax functions such as synID(), synIDattr() and
synIDtrans() (q.v.).


Best regards,
Tony.
--
If this fortune didn't exist, somebody would have invented it.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: search for null

On Fri, Jan 29, 2010 at 10:50:51PM EST, Tony Mechelynck wrote:

[..]

> In addition to all that has already been said in reply to this post, it
> helps to understand that the null is handled in a special way in Vim,
> because a null byte terminates a C string. Therefore, a null (0x00) is
> represented as a linefeed (0x0A) in Vim memory, and you don't see a
> linefeed because (at least on Unix/Linux and Dos/Windows, not sure about
> Mac OS9 and earlier) it terminates a line. This explains why a null is
> displayed as ^J in some places, ^@ in others, and why all of the
> following will enter a null (not only in Insert mode, but also on the
> command-line, including a / or ? search command line) (In all the
> following, if Ctrl-V does a paste on your system, use Ctrl-Q instead):
>
> Ctrl-V Ctrl-J
> Ctrl-V Ctrl-@
> Ctrl-V 000
> Ctrl-V 010
> Ctrl-V x00
> Ctrl-V x0A
> Ctrl-V o000
> Ctrl-V o012
> Ctrl-V u0000
> Ctrl-V u000A
>
> and why (in addition to using any of the above after a slash) any of the
> following will also search for a null:
>
> /[\d0]
> /[\d10]
> /[\x0]
> /[\xA]
> /[\o0]
> /[\o12]
> /[\u0]
> /[\u0A]
>
> See
> :help NL-used-for-NUL
> :help i_CTRL-V
> :help i_CTRL-V_digit
> :help c_CTRL-V
> :help /[
> then scroll (or read ;-) ) until a list of codes starting with \e
>
> and for Mac-format files
> :help CR-used-for-NL

Thanks for posting this & the pointers to relevant documentation..

I was seeing some very odd things re: \x0a & \x00 on my box.

CJ

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Adjusting line lengths

On 13/12/09 12:59, Hattori Hanzo wrote:
>
> Hello,
>
> and thanks to all of you!
>
> The joining issue is solved by
>
> :2,$j!
>
> and the splitting issue by
>
> :s/.\{49}/&\r/g
>
> As I'm working with genes, files are not that big and contain about 10000
> characters. However, when it comes to genomes, sequence lengths will get
> bigger. Therefore also thanks for the tip with file sizes beyond 10000
> lines.
>
> David

Also, you may prefer to only join lines not starting with >. I think the
following (untested) will do it:

:%s/^[^>].*\zs\n\ze[^>]//

Explanation: replace a line-break by nothing if preceded by
(start-of-line then not a > then zero or more of anything) and followed
by (not a > character). It _will_ join any number of lines, possibly
creating very long lines, with the performance hit that goes with it.

See
:help pattern-overview

which (until the next line of ====) is a kind of "cheat sheet" about
search patterns.

One Vim quirk which is relevant here (and also for your other question,
of breaking the long line into shorter lines of fixed length) is that
you *match* a line break with \n but (in the second part of an :s
command) you *insert* a line break with \r

Best regards,
Tony.
--
The typewriting machine, when played with expression, is no more
annoying than the piano when played by a sister or near relation.
-- Oscar Wilde

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: search for null

On 29/01/10 22:24, Ron Olson wrote:
> Hi all-
>
> Is there a particular way I can use to search for instances of null
> (ascii 0, hex 0x0) in a file? I haven't come up with a way to do so,
> yet there is clearly a null in my file as moving over it shows ascii 0
> and hex 0x0, I just want to find/highlight all the others.
>
> Thanks.
>

In addition to all that has already been said in reply to this post, it
helps to understand that the null is handled in a special way in Vim,
because a null byte terminates a C string. Therefore, a null (0x00) is
represented as a linefeed (0x0A) in Vim memory, and you don't see a
linefeed because (at least on Unix/Linux and Dos/Windows, not sure about
Mac OS9 and earlier) it terminates a line. This explains why a null is
displayed as ^J in some places, ^@ in others, and why all of the
following will enter a null (not only in Insert mode, but also on the
command-line, including a / or ? search command line) (In all the
following, if Ctrl-V does a paste on your system, use Ctrl-Q instead):

Ctrl-V Ctrl-J
Ctrl-V Ctrl-@
Ctrl-V 000
Ctrl-V 010
Ctrl-V x00
Ctrl-V x0A
Ctrl-V o000
Ctrl-V o012
Ctrl-V u0000
Ctrl-V u000A

and why (in addition to using any of the above after a slash) any of the
following will also search for a null:

/[\d0]
/[\d10]
/[\x0]
/[\xA]
/[\o0]
/[\o12]
/[\u0]
/[\u0A]

See
:help NL-used-for-NUL
:help i_CTRL-V
:help i_CTRL-V_digit
:help c_CTRL-V
:help /[
then scroll (or read ;-) ) until a list of codes starting with \e

and for Mac-format files
:help CR-used-for-NL


Best regards,
Tony.
--
Just because your doctor has a name for your condition doesn't mean he
knows what it is.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: filter output to scratch buffer

ven, 29 Jan 2010, Bob Hiestand skribis:
> On Thu, Jan 28, 2010 at 9:50 PM, bill lam <cbill.lam@gmail.com> wrote:
> > I map F5 to search dictionary with
> >
> > nmap <F5> :!dict <cword> <CR>
> >
> > The output is quite long and also it may contain some info that I
> > would like to copy.  Is it possible to redirect the output to a new
> > scratch buffer?
>
> You could do something like the following:
>
> :nmap <F5> :let dictScratch=system('dict ' .
> expand('<cword>'))<CR>:new<CR>:0put =dictScratch<CR>:set
> buftype=nofile<CR>

Thank you Bob, it works nicely.

--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: search for null

2010/1/29 Dominique Pellé <dominique.pelle@gmail.com>:
> Ron Olson wrote:
>
>> Hi all-
>>
>> Is there a particular way I can use to search for instances of null
>> (ascii 0, hex 0x0) in a file? I haven't come up with a way to do so,
>> yet there is clearly a null in my file as moving over it shows ascii 0
>> and hex 0x0, I just want to find/highlight all the others.
>>
>> Thanks.
>
> $ vim -u NONE -U NONE -c 'set hls dy=uhex'
>
> Then search for NUL char with:
>
> /<c-v>000<Enter>
>
> (where <c-v> is "control-v" key)
>
> and I see the NUL chars highlighted.

In terminal vim,

/<C-v><C-space>

will probably also do the trick. Useful to know sometimes, but
probably not too helpful in gvim.

~Matt

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Change vim/gvim colorschemes

On Fri, Jan 29, 2010 at 10:14:38AM EST, Athunye wrote:

> I was wondering about a possibility to get vim change colorschemes
> from time to time, Say, every 5 or 10 minutes (automatically). Of
> course the 'sleep' command won't help in this case.

> The script would read the contents of a directory with the
> colorschemes, or the colorscheme names would be placed in a list, or
> whatever. As I run GNU/Linux, I thought that perhaps some interaction
> with bash would help. Any ideas are appreciated.

Something different but may suggest implentation ideas:

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

CJ

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: search for null

On Jan 29, 1:24 pm, Ron Olson <tachokni...@gmail.com> wrote:
> Is there a particular way I can use to search for instances of null
> (ascii 0, hex 0x0) in a file? I haven't come up with a way to do so,
> yet there is clearly a null in my file as moving over it shows ascii 0
> and hex 0x0, I just want to find/highlight all the others.

/[\x0]

--
Bill
Santa Cruz, California

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Single-column 'set'?

On Jan 29, 10:52 am, "Benjamin R. Haskell" <v...@benizi.com> wrote:
> On Fri, 29 Jan 2010, Bee wrote:
> > On Jan 29, 7:43 am, "Benjamin R. Haskell" <v...@benizi.com> wrote:
> > > ...
> > > :redir @a
> > > ...
> > How to save directly to a filename?
> > [...]
> > But this creates a file named savevimrc in $HOME
>
> > redir > savevimrc
>
> > How to expand savevimrc to the file name?
>
> :exe "redir > " . savevimrc

Thank you Ben.

Will this always do the same?

:exe "redir >" savevimrc

From what I have read '.' concatenates without adding spaces,
whereas without using '.' a space will be added.

Is it just better to get the habit of using '.'?

--
Bill
Santa Cruz, California

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

RE: Change vim/gvim colorschemes

Athunye wrote:
> I was wondering about a possibility to get vim change
> colorschemes from time to time, Say, every 5 or 10 minutes
> (automatically). Of course the 'sleep' command won't help in
> this case.

This is one of the things explored at:
http://vim.wikia.com/wiki/Switch_color_schemes

John

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: search for null

Ron Olson wrote:

> Hi all-
>
> Is there a particular way I can use to search for instances of null
> (ascii 0, hex 0x0) in a file? I haven't come up with a way to do so,
> yet there is clearly a null in my file as moving over it shows ascii 0
> and hex 0x0, I just want to find/highlight all the others.
>
> Thanks.

$ vim -u NONE -U NONE -c 'set hls dy=uhex'

Then search for NUL char with:

/<c-v>000<Enter>

(where <c-v> is "control-v" key)

and I see the NUL chars highlighted.

See:
:help i_CTRL-V
:help 'dy'
:help 'hls'

-- Dominique

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: search for null

On 2010-01-29, Ron Olson wrote:
> Hi all-
>
> Is there a particular way I can use to search for instances of null
> (ascii 0, hex 0x0) in a file? I haven't come up with a way to do so,
> yet there is clearly a null in my file as moving over it shows ascii 0
> and hex 0x0, I just want to find/highlight all the others.

One way is to put the cursor on one of the nulls, type

yl

to yank the null, then type

/^R"

to search for the yanked character, where ^R means Ctrl-R.

Another way is to type

/^Vx00

where ^V means Ctrl-V. That will search for the character whose hex
value is 00.

Regards,
Gary


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

search for null

Hi all-

Is there a particular way I can use to search for instances of null
(ascii 0, hex 0x0) in a file? I haven't come up with a way to do so,
yet there is clearly a null in my file as moving over it shows ascii 0
and hex 0x0, I just want to find/highlight all the others.

Thanks.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: am i using

Saluton Ben :)

Ben Fritz <f...@gmail.com> skribis:
> On Jan 29, 2:20 am, Raúl Núñez de Arenas Coronado <raul...@gmail.com>
> wrote:
>>
>> IMHO, Vim is free software.
>
> I *MY* opinion, Vim's license is *more* free than the GPL. The GPL
> requires that any derivatives also use the GPL for their license.

Well, again, I don't have any intention of starting a flamewar here, but
I must say I agree with you. I switched from GPLv2 to Artistic 2.0 for
that and other reasons.

This said, I'm OK with any license as long as it allows you to reuse
knowledge (I'm simplifying, of course, but the key point is that for
me) without much hassle.

And again: Vim is, IMHO, free as in freedom.

--
Raúl "DervishD" Núñez de Arenas Coronado
Linux Registered User 88736 | http://www.dervishd.net
It's my PC and I'll cry if I want to... RAmen!

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: just starting with mingw in windows

On 29/01/10 18:32, o1792 wrote:
> Hi!
>
> How can I get my native window Gvim to compile and make programs in MinGW/MSys? I.e. I don't want to edit the code, and then switch to the MSys commandline. I 'd liek to type make and run the program from with the native windows vim environment.
>
> I expect I need to tell vim where to look, assuming it's possible that is.
>
> I looked this up in google, but the interest there seemed to be about compiling vim with mingw, which I couldn't see the point of, as the native binary on vim.org does the business.
>
> But this also meant I couldn't get any decent results for what I wanted.
>
> Advice welcome. Thank you!
>
>
>
>

1. You may want to use
:compiler gcc
before running make.

2. You may want to read
http://users.skynet.be/antoine.mechelynck/vim/compile.htm (but find out
for yourself how src/Make_ming.mak differs from src/Make_cyg.mak -- the
principles ought to be quite similar but some details may differ).

3. Where bash uses
export NAME='value'
you can achieve the same in Vim with
:let $NAME = 'value'

4. Any external program can be run with
:!progname
or (if you want the output in a buffer)
:0r !progname
; in addition, instead of
make <arguments>
at the bash prompt, you can use
:make[!] <arguments
in Vim (and see the results in quickfix if your compiler is set
correctly). (The exclamation mark avoids jumping to the first error.)


Best regards,
Tony.
--
"Heisenberg may have slept here"

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Single-column 'set'?

On 2010-01-29, Benjamin R. Haskell wrote:
> I just managed to clobber one machine's ~/.vim.local directory (where I
> keep machine-specific settings). Luckily I have an instance of 'vim'
> still running with the old settings. Armed with my recent ':redir @a'
> knowledge (thanks to Brett and wikia), I've managed to save the
> settings I care about, via:
>
> :redir @a
> :let
> :set
> :abbrev
> :map
> :redir END
>
> But, I was wondering: is there a way to get single-column output for
> ':set'? The results I got were hard to 'diff'.

You could use :mkvimrc.

HTH,
Gary


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Single-column 'set'?

On Fri, 29 Jan 2010, Bee wrote:

> On Jan 29, 7:43 am, "Benjamin R. Haskell" <v...@benizi.com> wrote:
> > ...
> > :redir @a
> > ...
>
> How to save directly to a filename?
>
> [...]
>
> But this creates a file named savevimrc in $HOME
>
> redir > savevimrc
>
> How to expand savevimrc to the file name?

:exe "redir > " . savevimrc

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Single-column 'set'?

On Jan 29, 7:43 am, "Benjamin R. Haskell" <v...@benizi.com> wrote:
> ...
> :redir @a
> ...

How to save directly to a filename?

This works:

redir > savevimrc.txt

And the following does what I want:

let savevimrc=strftime('~/Desktop/%Y%m%d.%H%M%S-vimrc.txt')
echo savevimrc

But this creates a file named savevimrc in $HOME

redir > savevimrc

How to expand savevimrc to the file name?

--
Bill
Santa Cruz, California

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Autoindents lists in C comments

On 2010-01-29, Robbo wrote:
> Is it possible to autoindent lists in C comments.
> What's the right way?

It depends on the type of list you want to have within your C
comments. The basic idea is that you need to include the list item
leader in 'comments' and tag it with the 'n' flag to tell vim that
it can be nested. See

:help 30.6

and search for "nest". Also see

:help comments
:help format-comments

I'm afraid I don't have an example handy. You may have to
experiment a bit to get the behavior you want.

Regards,
Gary


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: how to use string variable for "cs add" command

On 2010-01-28, sc wrote:
> On Thursday 28 January 2010 09:31:07 pm Ni, Ruiyu wrote:
>
> > Thanks pansz!
> > It works!!
> >
> > But I found ctags cannot work as well.
> >
> > let CodeRoot = "E:/code"
> > let TagsDb = CodeRoot . "/tags"
> >
> > use
> > exe "set tags = " . TagsDb
> > or
> > set tags = TagsDb
> >
> > both cannot work. Do you have any idea? Thanks in advance!
>
> from
>
> :help set
>
> i see "White space between '=' and {value} is not allowed." -- so
> you should probably try
>
> exe "set tags=" . TagsDb

Or you could use let:

let &tags = TagsDb

See

:help let-&

Regards,
Gary


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

just starting with mingw in windows

Hi!

How can I get my native window Gvim to compile and make programs in MinGW/MSys? I.e. I don't want to edit the code, and then switch to the MSys commandline. I 'd liek to type make and run the program from with the native windows vim environment.

I expect I need to tell vim where to look, assuming it's possible that is.

I looked this up in google, but the interest there seemed to be about compiling vim with mingw, which I couldn't see the point of, as the native binary on vim.org does the business.

But this also meant I couldn't get any decent results for what I wanted.

Advice welcome. Thank you!


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: HTML editing: treat tags as a unit

On 11/12/09 17:24, Erik Falor wrote:
> On Fri, Dec 11, 2009 at 10:38:46AM -0500, Dennis German wrote:
>> What are your favorite scripts for editing HTML?
>>
>> Is there a script that treats HTML tags as units?
>> Like maybe mapping gw and gb ?
>>
>> For example with:
>>
>> <tr><td colspan="5"><h1>
>>
>> Starting in the first column,
>> currently the first w positions
>> after the "<" the next w before the">"
>> and the third w skips over the "><" and
>> cursor is positioned in the middle of the next tag
>> before the "td"
>>
>> I would like the gw to skip to the end of the<tr>
>>
>> In the following the pipe "|" shows the desired units
>>
>> <tr>|<td colspan="5">|<h1>
>>
>> Thanks in advance.
>>
>
> One way to do this is to use the f and F commands with< >. Read up
> on it at :help f.
>
> Also, checkout :help text-objects. Combining text-objects with
> normal-mode commands is one of Vim's strongest features. Basically,
> text-objects allow you to perform any action you might take on a word
> or line of text on an entire HTML tag, including its child nodes.
>
> Devin Weaver's xmledit plugin is highly rated and helpful, too:
> http://www.vim.org/scripts/script.php?script_id=301
>

In particular, the following objects are relevant to HTML/XML/etc.:

at from <tag> to the corresponding </tag> (including the tags)
it the contents between <tag> and </tag> (but not the tags
themselves)
a< from < to the corresponding > (inclusive at both ends)
i< from < to the corresponding > (exclusive at both ends)

at (or 1at ) means "the innermost tag containing the cursor", 2at is the
one around that, etc. These objects are meant to be used after an
operator, where a movement would be expected, e.g. yit to "yank the
inner tag", dat to "delete a tag", v2at to select the 2nd-level tag
around the cursor as a characterwise visual area, etc.

In all the above cases, nesting will be correctly handled (e.g. in the
case of a <div> containing another <div> inside it, or of a <ul> or <ol>
list where one of the <li> lines contains a further <ul> or <ol>, etc.).

I don't think it works for "implicitly closed" HTML tags, such as a <p>
closed implicitly by the next <p> in the absence of an intervening </p>,
similarly for <td> <td> without </td> or <li> <li> without </li> etc.;
but I haven't tried.


I also use the CloseTag plugin, which I still find useful, though its
usefulness has admittedly diminished now that you can use
omni-completion (after </ ) to close a tag. And then there is the
matchit plugin (distributed with Vim but not enabled by default) to jump
(when editing HTML) from < to > and back, from <tag> to </tag> and back,
etc.


Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
250. You've given up the search for the "perfect woman" and instead,
sit in front of the PC until you're just too tired to care.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Single-column 'set'?

On Fri, 29 Jan 2010, Tim Chase wrote:

> Benjamin R. Haskell wrote:
> > I just managed to clobber one machine's ~/.vim.local directory
> > (where I keep machine-specific settings). Luckily I have an
> > instance of 'vim' still running with the old settings. Armed with
> > my recent ':redir @a' knowledge (thanks to Brett and wikia), I've
> > managed to save the settings I care about, via:
> >
> > :redir @a
> > :let
> > :set
> > :abbrev
> > :map
> > :redir END
> >
> > But, I was wondering: is there a way to get single-column output for
> > ':set'? The results I got were hard to 'diff'.
>
> My first ugly-but-post-processable idea was to
>
> :set columns=12
>
> (apparently the min allowed..something I hadn't considered before) and
> then each value output from ":set" comes out on its own line (or split
> across multiple lines if too long...but appears unbroken in :redir
> output)
>
> and then restore your previous value for 'columns'. Granted, for
> obvious reasons, your diff will have a mismatched value for 'columns'
> ;-)

Hmm. I like it. Oddly, it only seems to affect the 'redir'ed output,
but it was almost exactly what I was looking for.

--
Thanks,
Ben

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Single-column 'set'?

Benjamin R. Haskell wrote:
> I just managed to clobber one machine's ~/.vim.local directory (where I
> keep machine-specific settings). Luckily I have an instance of 'vim'
> still running with the old settings. Armed with my recent ':redir @a'
> knowledge (thanks to Brett and wikia), I've managed to save the
> settings I care about, via:
>
> :redir @a
> :let
> :set
> :abbrev
> :map
> :redir END
>
> But, I was wondering: is there a way to get single-column output for
> ':set'? The results I got were hard to 'diff'.

My first ugly-but-post-processable idea was to

:set columns=12

(apparently the min allowed..something I hadn't considered
before) and then each value output from ":set" comes out on its
own line (or split across multiple lines if too long...but
appears unbroken in :redir output)

and then restore your previous value for 'columns'. Granted, for
obvious reasons, your diff will have a mismatched value for
'columns' ;-)

-tim

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: How to go to command line mode from script



On Fri, Jan 29, 2010 at 3:45 PM, Aarto Matti <aarto.matti@gmail.com> wrote:
Thanks, I did it! But still, how to send <CR> now? This is the function I'm trying to implement:

function! RunProject(...)
    if !exists("s:project_command") || s:project_command=="" || (a:0==1 && a:1=="alter")
        let s:project_command=expand("%:p")
        return ':!'.s:project_command
    else
        return ':!'.s:project_command<CR>
    endif
endfunction
map <expr> <F12> RunProject()
map <expr> <C-F12> RunProject("alter")


Ok,

return ':!'.s:project_command."\n"
that works :)


--
Aarto

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: filter output to scratch buffer

On Fri, Jan 29, 2010 at 9:51 AM, Bob Hiestand <bob.hiestand@gmail.com> wrote:
> On Thu, Jan 28, 2010 at 9:50 PM, bill lam <cbill.lam@gmail.com> wrote:
>> I map F5 to search dictionary with
>>
>> nmap <F5> :!dict <cword> <CR>
>>
>> The output is quite long and also it may contain some info that I
>> would like to copy.  Is it possible to redirect the output to a new
>> scratch buffer?
>
> You could do something like the following:
>
> :nmap <F5> :let dictScratch=system('dict ' .
> expand('<cword>'))<CR>:new<CR>:0put =dictScratch<CR>:set
> buftype=nofile<CR>

That should all be on one line.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: filter output to scratch buffer

On Thu, Jan 28, 2010 at 9:50 PM, bill lam <cbill.lam@gmail.com> wrote:
> I map F5 to search dictionary with
>
> nmap <F5> :!dict <cword> <CR>
>
> The output is quite long and also it may contain some info that I
> would like to copy.  Is it possible to redirect the output to a new
> scratch buffer?

You could do something like the following:

:nmap <F5> :let dictScratch=system('dict ' .
expand('<cword>'))<CR>:new<CR>:0put =dictScratch<CR>:set
buftype=nofile<CR>

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Single-column 'set'?

I just managed to clobber one machine's ~/.vim.local directory (where I
keep machine-specific settings). Luckily I have an instance of 'vim'
still running with the old settings. Armed with my recent ':redir @a'
knowledge (thanks to Brett and wikia), I've managed to save the
settings I care about, via:

:redir @a
:let
:set
:abbrev
:map
:redir END

But, I was wondering: is there a way to get single-column output for
':set'? The results I got were hard to 'diff'.

--
Best,
Ben

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: am i using

On Jan 29, 2:20 am, Raúl Núñez de Arenas Coronado <raul...@gmail.com>
wrote:
>
> IMHO, Vim is free software.
>

I *MY* opinion, Vim's license is *more* free than the GPL. The GPL
requires that any derivatives also use the GPL for their license. I'm
simplifying (see :help license), but Vim allows you to choose your own
license for your modified version. If I understand correctly, the only
conditions are that Bram reserves the right to get and distribute your
source code without fee, and you can't set restrictions on anyone from
distributing the executable.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Change vim/gvim colorschemes

I was wondering about a possibility to get vim change colorschemes
from time
to time, Say, every 5 or 10 minutes (automatically). Of course the
'sleep' command won't help
in this case.

The script would read the contents of a directory with the
colorschemes, or the colorscheme names
would be placed in a list, or whatever.
As I run GNU/Linux, I thought that perhaps some interaction with bash
would help.
Any ideas are appreciated.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Restoring contents

Hi,

Tim Chase wrote:
>> I had typed .wq! instead wq! while saving and closing the file
>> in vim.All the contents i had in my file had got lost.Kindly
>> let me know how can I retreive the contents of the file.Thanks
>> in Advance.Help me in this as the file contained important
>> information.
>
> I'm afraid you don't make much sense here: if you actually typed
> ".wq!", then the file would have been written to disk.

note the dot: this overwrites the original file with the current line.

Charany/Momdad/whoever, have you set the 'backup' option? Then you
might have a backup file with a ~ or .bak append to the original name.

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.
For more information, visit http://www.vim.org/maillist.php

Re: Restoring contents

> I had typed .wq! instead wq! while saving and closing the file
> in vim.All the contents i had in my file had got lost.Kindly
> let me know how can I retreive the contents of the file.Thanks
> in Advance.Help me in this as the file contained important
> information.

I'm afraid you don't make much sense here: if you actually typed
".wq!", then the file would have been written to disk. If you
meant to write "I had typed :q! instead of :wq!", then you may be
a bit out of luck because the "!" is interpreted as "and I mean
it because I know what I'm doing, even if that involves
abandoning my changes". Vim trusts you to know what you're doing
if you say you do.

You best bet would be

1) copy your viminfo to a safe archive

2) if you have an undelete utility, try to undelete the
associated .swp file for your file. You may or may not have
success with this. If you undelete it, and restart vim on the
file with the "-r"ecover option, it may offer you the ability to
recover as much as it has available.

3) if #2 didn't work, take a look in your archived viminfo file
to see if any salvageable information was stashed there (possibly
in stored registers). This won't get you the complete document,
but if you happened to do something that involved
yanking/deleting a large block of text, at least that portion
could be redeemed.


Otherwise, consider it a lesson in typing what you mean. Just
like in any other program, if using the Quit option prompts you
(which regularly using ":q" sans-exclamation-point would remind
you, a good habit to acquire) to save and you decline (by
specifying "!" in Vim), it's your own fault.

-tim

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Cscope quickfix -- not jump to first error

Apologies, I've forgotten to attach the patch

>> The solution should probably be to have something else than "find" after
>> ":cscope".
>
> Ok, attached is another try which extends csqf option as suggested by Ben.

--
Sergey Khorev
http://sites.google.com/site/khorser
Can anybody think of a good tagline I can steal?

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Cscope quickfix -- not jump to first error

> The solution should probably be to have something else than "find" after
> ":cscope".

Ok, attached is another try which extends csqf option as suggested by Ben.

--
Sergey Khorev
http://sites.google.com/site/khorser
Can anybody think of a good tagline I can steal?

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Restoring contents

Hi

I had typed .wq! instead wq! while saving and closing the file in vim.All
the contents i had in my file had got lost.Kindly let me know how can I
retreive the contents of the file.Thanks in Advance.Help me in this as the
file contained important information.

--
View this message in context: http://old.nabble.com/Restoring-contents-tp27372314p27372314.html
Sent from the Vim - General mailing list archive at Nabble.com.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Resteoing contents

Hi

I had typed .wq! instead wq! while saving and closing the file in vim.All
the contents i had in my file had got lost.Kindly let me know how can I
retreive the contents of the file.Thanks in Advance.Help me in this as the
file contained important information.


--
View this message in context: http://old.nabble.com/Resteoing-contents-tp27372279p27372279.html
Sent from the Vim - General mailing list archive at Nabble.com.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Re: Cscope quickfix -- not jump to first error



On Fri, Jan 29, 2010 at 7:33 AM, Sergey Khorev <sergey.khorev@gmail.com> wrote:
> Instead of a ! on the command, how about incorporating it into
> 'cscopequickfix'? For example, the following could be made a valid
> setting:

Agreed, that should make more sense.


I'm agree as well, extending 'cscopequickfix' is a better way.

--
Aarto

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php