boss | 1 Apr 16:23 2015

How to stop buffer number incrementing when writing to a temp file?

Hello!

I started this thread on vim_dev[1] and it was suggested I continue here instead.

> I fail to understand, why this is a problem, but you should be able to work around that using the writefile()
function, which seems to be better suited for such a case.

Over the course of a day that VimL runs hundreds or thousands of times, and when I only work on a dozen files it
seems...inefficient that the buffer number is up in the hundreds or higher.  It doesn't break anything but
it's an unwanted side-effect.

I looked at writefile() and confess I was confused by its documentation.  How does one call it so that the
buffer's contents are written exactly as-is, i.e. without changing line endings or adding/removing a
final line ending?

Many thanks,

Andy

[1] https://groups.google.com/forum/#!topic/vim_dev/oDyCq5Al7FY

-- 
--

-- 
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 <at> googlegroups.com.
(Continue reading)

Ivan | 1 Apr 05:14 2015
Picon

mapping dot to trigger omni completion

Towards the end of `:help ins-completion` there's mention of mapping `.` to trigger omni completion when possible:

inoremap <expr> . MayComplete()
func MayComplete()
    if (can complete)
      return ".\<C-X>\<C-O>"
    endif
    return '.'
endfunc

I like this idea, but have no idea what might be used for the "can complete" if-condition. Any ideas out there?

-- 
--

-- 
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 <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Markus Mottl | 30 Mar 17:29 2015
Picon

Incorrect column positions with vertical splits

Hi,

Vim may report incorrect column positions when vertical splits force a
line to wrap.

E.g. enter a line consisting of 80 characters of 'x's.  Now perform
vertical splits until the split windows are too small to display all
80 characters in one line.  Right now, Vim will still display correct
column positions in the status line, because it cannot break the line
at a word boundary and hence needs to wrap it within the word.

Now move the cursor to e.g. column 40 and replace the 'x' there with a
whitespace.  Vim will break the line at the whitespace.  If you move
the cursor past the break, you will notice that the column count in
the status line will suddenly jump, apparently incorrectly counting
some whitespace that was used to fill in the break.

Note that jumping to column positions in the line using '|' will not
work as expected anymore either if the position falls within the "jump
range".  The cursor will just move to the position of the break
instead.

This problem was observed using text-mode Vim version 7.4.258 on Mac OS X.

Best regards,
Markus

--

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl <at> gmail.com

(Continue reading)

Peng Yu | 30 Mar 03:36 2015
Picon

What category does the help page for AnsiEsc belong to?

Hi,

`:help` shows the following categories of help topics. But what does
AnsiEsc belong to?

                          WHAT                  PREPEND    EXAMPLE
                      Normal mode command      (nothing)   :help x
                      Visual mode command         v_       :help v_u
                      Insert mode command         i_       :help i_<Esc>
                      Command-line command        :        :help :quit
                      Command-line editing        c_       :help c_<Del>
                      Vim command argument        -        :help -r
                      Option                      '        :help 'textwidth'

-- 
Regards,
Peng

-- 
--

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

(Continue reading)

Peng Yu | 29 Mar 23:45 2015
Picon

How to get to the helppage of shiftwidth in options.txt?

Hi,

When I ":help shiftwidth", I get to eval.txt. But I'd like to get to
options.txt. How to do so? Thanks.

-- 
Regards,
Peng

-- 
--

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

arunj | 29 Mar 22:46 2015
Picon

Understanding Vim exclusive motions.

Hi all,

I have just started with vim, and i need some help.  This is a bit lengthy, please bear with me :).

I refer to : http://vimdoc.sourceforge.net/htmldoc/motion.html#exclusive.
Specifically, the following text:

Which motions are linewise, inclusive or exclusive is mentioned with the
command.  There are however, two general exceptions:

1. If the motion is exclusive and the end of the motion is in column 1, the
   end of the motion is moved to the end of the previous line and the motion
   becomes inclusive.  Example: `}` moves to the first line after a paragraph,
   but `d}` will not include that line.

Given the following piece of text to start with:

    This is just a random paragraph.

    This is another random paragraph (Some text inside brackets).

    This is a third paragraph.

I start with my cursor on the character `S`, just after the `(`, in the second paragraph.

I do the following commands - `d}` - in normal mode.  I get the following:

    This is just a random paragraph.

    This is another random paragraph (
(Continue reading)

Alessandro Antonello | 29 Mar 22:32 2015
Picon

Correct syntax for enums in C++

Hi everyone.

I want to correctly highlight enumeration values in a C++ application. I tried several approaches but the only one that worked is a little overkill. So I got here to ask the experts.

Suppose that I have a class named "MyClass". That class declares an enum with several values: "EnumConst1", "EnumConst2", etc. In the syntax file, off course, I added "MyClass" in a keyword group of C++ classes:

syn keyword cppClass MyClass

What I want to do is highlight the enumeration values only when they are typed with the class identifier. Like; "MyClass::EnumConst1". I tried this in the following way:

syn macth cppEnum transparent /\<MyClass::\ <at> <=\i\w*\>/
syn keyword cppEnumValue contained EnumConst1 EnumConst2 containedin=cppEnum

Didn't work. I know that the keyword syntax of "MyClass" have precedence over the match syntax but I thought that using it in a transparent match would not interfere in the highlight of the contained enumeration value, since the operator '\ <at> <=' is only to check the presence of a string before the real match. Writing the match in the following way works:

syn match cppEnumValue /\<MyClass::\ <at> <=\(EnumConst1\|EnumConst2\)\>/

But then the 'MyClass' is not highlighted as cppClass group. Only the numeration values are highlighted. And, for a large list of enumeration values, would be overkill to write matches all over it.

There is a solution to this?

Thanks in advance.

--
--
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 <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Charles E Campbell | 28 Mar 21:43 2015

which match-highlighting is in effect (if any) at a point in a file?

Hello!

In using :match, :2match, :3match, or matchadd(), one may specify 
special highlighting.  Any easy way for a vimscript to know which, if 
any, highlighting match is active?   Such highlighting overrides the 
usual syntax highlighting, and I'd like to know what's going on at the 
current cursor position.

Thank you,
Chip Campbell

-- 
--

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

Meino.Cramer | 28 Mar 11:02 2015
Picon
Picon

Bunch of files loaded ==> convertion into "loaded into single tabs"

Hi,

accidentally I have loaded a bunch of files into vim without giving
the "-p" option.
Is there a way to convert this "loading scheme" (or how can one name
that? 8) into the "with separated tabs"-loading scheme without restart
vim again?

Thank you very much in advance for any help!
Best regars,
Meino

-- 
--

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Meino.Cramer | 24 Mar 19:17 2015
Picon
Picon

Looking for a simple Lisp"""IDE"""


Hi,

I am starting to learn Lisp. And I want to use vim 
for that, because there is no other editor... ;)

I am looking for something simple, which executes my current
lisp code in the buffer via sbcl (Steel Bank Common lisp).

I tried to install slimv and limp and failed ... and I think,
they are too big for me...I dont need hyperspec and thesaurus
and...an embedded mp3 play with bluetooth (THIS IS NO IMPLIED
CRITISM! It is only an expression of my helplessness... :)

I onlu want:
Edit Lisp code in vim (I installed pared and rainbox parens) and
a way to send the code to sbcl in another buffer.

What can I use for that?

Thank you very much in advance for any help!
Best regards,
Meino

-- 
--

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adrian | 24 Mar 19:15 2015
Picon

Is there a way to cause vim to display the console screen without actually shelling to it?

I'd like to jump between the console and the editor without having the console scroll up.

Is there a way that this can be done?  I see that there are terminal codes that save and restore the screen and
this seems to be what vim uses to restore the console when you shell or Ctrl-Z out, so there must be a way to
restore it without causing the shell to be invoked resulting in the terminal being scrolled up. Then a user
can hit any key to restore the vim display.

If this isn't a default feature, could this be done in scripting?

Thanks,

A

-- 
--

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

Gmane