short term, it is good way to provide links to the vimscripts of
vim.org.
[1] http://vim.wikia.com/index.php?title=Special%3AAllpages&from=&namespace=10
[2] http://vim.wikia.com/wiki/Template:Review
[3] http://vim.wikia.com/wiki/Template:Tip
--
Luc Hermitte
http://hermitte.free.fr/vim/
pages of that category.
>From my very little experience regarding the organisation of a wiki from
scratch, I'll say that everytime we put a page into a new category, we have to
define right away the page of that new category. Otherwise, another similar, but
different) category may emerge.
--
Luc Hermitte
http://hermitte.free.fr/vim/
Hello,
Tom Purl <[EMAIL PROTECTED]> wrtoe:
> How do you update the categories? I can't seem to find that text when I
> edit the full page.
We need to edit the tips to add them one, or several category tags.
e.g.: [[Category:Integration]]
BTW, nice work!
--
iles/plugin/local_vimrc.vim
> I did that. Here are the results (the headings of the first search
> results pages) from searching for the plugin.vim script that Luc
> suggested.
> [...]
> If one searches instead for "project", one does indeed get 66
> results.
> [...]
> Maybe that's what Luc intended, but it isn't what he wrote.
Indeed, I meant project.vim. My mistake.
--
Luc Hermitte
http://hermitte.free.fr/vim/
ns with this name) or plugin.vim
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
lementing such abbreviations.
-> http://hermitte.free.fr/vim/ressources/lh-map-tools.tar.gz
(Note: it also comes with a bracketing-system, and all the documentation
you'll need -> :h MapNoContext(), :h BuildMapSeq(). For more advanced
mappings have a look at my C&C++ ftplugins suite.)
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
d in plugin/common_brackets.vim
> thanks again.
You're welcome.
--
Luc Hermitte
http://hermitte.free.fr/vim/
plate I'm
maintaining (which relies on the bracketing system) -- see my signature.
The marker/placeholder can be easily enable or disabled, cutomized for
every language, ...
--
Luc Hermitte
http://hermitte.free.fr/vim/ressources/
ntained anymore. [2]
If you have any questions feel free to ask. I've tried to write a
documentation (the one in the tarball) as complete as I could, but I may
have missed a few details.
HTH,
[1] it contains many mappings to insert control-statements (if, for,
...) in every mode.
[2] http://hermitte.free.fr/vim/ressources -> *.tar.gz
--
Luc Hermitte
http://hermitte.free.fr/vim/
5/5.00503/sun4-solaris/CORE
Linking: cc -L/usr/dt/lib -R /usr/dt/lib -o vim -lXmu -lXext -lXm -lSM -lICE
-lXt -lX11 -ltermlib -R /usr/perl5/5.00503/sun4-solaris/CORE
/usr/perl5/5.00503/sun4-sol
aris/auto/DynaLoader/DynaLoader.a -L/usr/perl5/5.00503/sun4-solaris/CORE -lperl
-lsocket -lnsl -ldl -lm
>% --
HTH,
--
Luc Hermitte
ptions vim was launched with (thanks to a system('ps
-relevant-options')) ?
HTH,
[1] I don't know whether it is relevant or not.
--
Luc Hermitte
http://hermitte.free.fr/vim/
doesn't.
>
> Also, while I'm at it: is there any reason why 1G doesn't work, but :1
> does, to start from a known point.
Auto-commands are expecting a command, not a normal mode sequence. Try
``:normal! 1G'' instead of ``1G''
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
e if (filetype == vhdl)
I use ftplugins, and buffer local mappings
->
" {rtp}/ftplugin/vim/at_a.vim
inoremap @a A
" {rtp}/ftplugin/c/at_a.vim
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
t;http://hermitte.free.fr/vim/ressources/>
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
gt;
> Someone needs to try this to compare the two approaches.
Using the talk page seems more natural to me when there are "important" changes
(refactoring) to discuss on the organisation of a tip.
I'm no big fan of having several "bug reports" (or alike) in the tip page.
--
Luc Hermitte
ntually update the latest version of the suite.
--
Luc Hermitte
http://hermitte.free.fr/vim/
rses the output of the compilation
- >%
#!/usr/bin/perl
# Main loop: get rid of /^\s*[.*]\s*/
while (<>)
{
chop;
$_ =~ s/^\s*\[.*?\]\s*// ;
print "$_\n";
}
- >%
[1] http://hermitte.free.fr/vim/ressources/lh-BTW.tar.gz
HTH,
--
Luc Hermitte
You can use plugins like project.vim or local_vimrc [1] to set your 'makeprg'
when the current path is under your ProjectDir.
The typical setting for &makeprg would be
cd /abs/path/to/ProjectDir ; make $*
[1] http://hermitte.free.fr/vim/ressources/vimfiles/plugin/loca
my web site at
http://hermitte.free.fr/vim/ressources/
The version on my web site may be more recent.
[1] I'm of course 100% subjective. :)
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
paths into win32 paths.
It should be easy to do adapt the perl script to do the contrary.
It can be found in compiler/BTW/cygwin.pl which is bundled into:
http://hermitte.free.fr/vim/ressources/lh-BTW.tar.gz
(This vim plugin works, but it is still is alpha stage :-()
HTH,
--
Luc Hermitte
http://hermitte.free.fr/cygwin/
http://hermitte.free.fr/vim/
ipt that proposes neat o-mappings to
delete/select quotes.
-> http://vim.sourceforge.net/scripts/script.php?script_id=99
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
friend, even if I haven't moved all my scripts into
subversion repositories.
Having a documentation that also stats the purpose of your scripts is
plus.
HTH,
[1] http://hermitte.free.fr/vim/ressources/vim-config.pdf
--
Luc Hermitte
http://hermitte.free.fr/vim/
- >% -
The last function can be used with:
- Align the arguments that follow the first comma
:%s#,\zs#\=CompleteWithUpToCol('~', 42)
- Align the the equal signs
:%s#\ze=#\=CompleteWithUpToCol(' ', 50)
HTH,
--
Luc Hermitte
f course. I meant "can be used as word separator"
-> :MyCommand and not :MYCOMMAND
--
Luc Hermitte
http://hermitte.free.fr/vim/
commands?)
I'm not aware of any feature like this one.
We can obtain the associated action of a mapping before it is overriden, but
after that it would be too late. Moreover, we have no guarantee that another
mapping will not try to override the association.
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
addlocal STLFilt
:BTW help
...
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
and would like to write a script to do it.
There is a perl script that does that.
Sometimes ago, I forked it to fix a few things, and suit my needs.
-> http://hermitte.free.fr/vim/ressources/tools
+-> vim2html3.pl (the main script)
+-> VimDetect.pm (perl module the script depends
gt;
> Save these commands into your $VIM\vimfiles\after\syntax\matlab.vim
> (Windows platform)
> or ~/.vim/after/syntax/matlab.vim
This is not the right place to do that. ftplugins are the right
solution.
=> ~/.vim/ftplugin/matlab.vim
And BTW, don't use :set, but :setloc
lar to the script
cyg-wrapper I'm maintening (check my signature). The easiest thing to do
is probably to adapt cyg-wrapper to not use "cygpath" and other programs
related to windows (like "start")
Otherwise, may be you can play with things like FilePreRead and :file ?
r than use the one
> above the quickfix window.
:h 'switchbuf' -> split
> 2) If the buffer is already open in another tab page, I'd like to jump
> there, instead of opening it in this tab again.
:h 'switchbuf' -> useopen, usetab
HTH,
--
Luc Hermitte
/vim/ressources/vimfiles/doc/VS_help.html#VS-References>
Matthieu's plugin seems to be the more popular one.
HTH,
--
Luc Hermitte
sor anywhere, not necessarily on the
first placeholder.
IIRC, that's what has been done in Srinath & al. IMAP.vim plugin: the
cursor is moved to the first placeholder.
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
abbreviation ...
This issue has been discussed here a couple or week, may be less.
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
ines or columns you have to move the cursor, it
becomes quickly boring to maintain the end-user mappings. Moreover, you
won't be able to propose customizations like inserting newlines before
and/or after curly- and round-brackets -- because the coding rules in
different projects require different presentations.
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
Hello,
* On Fri, Sep 22, 2006 at 07:52:28AM +0200, Kim Schulz <[EMAIL PROTECTED]>
wrote:
> On Thu, 21 Sep 2006 23:36:19 +0200
> Luc Hermitte <[EMAIL PROTECTED]> wrote:
> > > any ideas?
> >
> >
> > Why don't you use already existing solutions
for the class and doxygen
wizards).
Otherwise there exist a few other similar placeholders systems (either
forks of my work, or even complete and (simplified) rewrites).
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
--- >% -
NB: the lastest version of the local_vimrc plugin I'm maintaining can be found
there:
http://hermitte.free.fr/vim/ressources/vimfiles/plugin/local_vimrc.vim
The plugin Project can also help you solve your problem.
HTH,
--
Luc Hermitte
detects
syntax elements with "string" or "comment" in their name, to inject them
with the new cluster.
I've never checked if it worked correctly with Python, but I see no
reason why it shouldn't.
Of course the best solution is to have all syntax-plugin maintainers to
update their scripts.
--
Luc Hermitte
http://hermitte.free.fr/vim/
modelines.
>
> That's not true. You can only set options.
That's easily extensible. See
<http://vim.sourceforge.net/scripts/script.php?script_id=83>
--
Luc Hermitte
http://hermitte.free.fr/vim/
e
mapping to pass %< to :make.
--
Luc Hermitte
ring. In any case, the function below simply seeks to the root of
> the filesystem searching for a _lvimrc and stops after finding one.
Check for instance
<http://hermitte.free.fr/vim/ressources/vimfiles/plugin/local_vimrc.vim>.
Several unusual cases are taken into account.
BTW, I do not ne
r to the one posted by
Yakov.
I know two plugins, having the same name (local_vimrc.vim), that implement this
feature. I'm maintening one of them. Both are on sourceforge. It seems the
latest version of my script hasn't been uploaded for a while ...
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
(the plugin does many more
things related to the management of compilation chains).
HTH,
[1] http://hermitte.free.fr/vim/ressources/lh-BTW.tar.gz
PS: I don't know if this email will reach the mailing or not as SORBS
filtering seems to have been reactivated.
--
Luc Hermitte
http://hermitte.free.fr/vim/
as I guess, its implementation relies on the same functions than
searchInRuntime.vim, try "*bbb" for your filename.
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
e
file found.
If several files match (a glob pattern is expected), a dialog box asks
for the file to open. If the file is already opened in a window, the
window gains the focus.
Command completion is supported for the filenames.
HTH,
[1] searchInRuntime.vim. It should be the plugin #229 on SF.
--
Luc Hermitte
http://hermitte.free.fr/vim/
Hello,
Gary Johnson <[EMAIL PROTECTED]> wrote:
> On 2006-07-27, Luc Hermitte <[EMAIL PROTECTED]> wrote:
>
> > More over I don't have any c:/ drive, and the shell can be anything.
>
> I'm having a little trouble understanding how the shell can be
> anyth
only available through CVS.
BTW, I have troubles to browse the CVS repository from the web. I don't know if
anything can be done.
HTH,
--
Luc Hermitte
d that translates
pathnames (and only pathnames) -> cyg-wrapper.sh
- a plugin that provides a few functions to detect the current system
- .vimrc specific settings according to the current box vim is running
on
- a few plugins that call external programs (lh-vim-spell, triggers)
- a compi
/ada.vim (see ":help after-directory")
> for small tweaks not requiring a full aye-to-zed rewrite of the whole
> ftplugin.
In that particular case [*], not using the after sub-hierarchy avoids the
mapping to the default key-binding.
[*] when there is a Something, and that its definition is protected with
hasmapto() as Charles suggested.
--
Luc Hermitte
Hello,
Charles E Campbell Jr <[EMAIL PROTECTED]> wrote:
> [...]
> the plugin should be using: (untested, as I don't use Ada myself)
>
> if !hasmapto('JumpToTag_ada')
> nnoJumpToTag_ada
> endif
> nmap
are also defined. ->
if, if, ...
See |C_control-statements| and |C++_control-statements|.
--
Luc Hermitte
e lastest version is available at
<http://hermitte.free.fr/vim/ressources/lh-cpp.tar.gz>.
A major release is planned soon. I may have forgotten to package a couple of
files for the classe & doxygen wizards.
It is also available on SF, however I haven't updated it for a coupled of years.
HTH,
--
Luc Hermitte
ed to é
Does anything happen when you hit ``é'' ?
The most probable hypothesis is that you have something mapped to .
As vim is not able to see the difference between and é, you
will not be able to insert é.
Did you look at the result of
verbose imap é
?
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
n Statement (as by default), but curly-underlined
; types like std::string also highlighted as usual but curly-underlined, ...
In other words, in there a way to emulate the highlighting policy of vim7
spellchecker that adds the curly underline to the current highlighting ?
--
Luc Hermitte
sult in a script-local variable, outside functions.
=>
let s:script_dir = expand(':p:h')
fun! s:Foo()
echo s:script_dir
endfunction
nnoremap :call Foo()
--
Luc Hermitte
n.
If the pattern is matched, we expand the first parameter. The second
otherwise.
> What the regex matches is an opening bracket or parenthesis followed
> by a number of non-closing-bracket characters.
>
> Shouldn't the closing parenthesis be included also in the regex?
> '[[(][^])]\+'
Of course. You're right.
--
Luc Hermitte
http://hermitte.free.fr/vim/
n gmane:
<[EMAIL PROTECTED]>
He used the function InsertIfNotAfter() I define in my C++ ftplugin
cpp_set.vim available in lh-cpp.tar.gz [1].
In your case, I guess it will look like:
inoremap ,
\ =InsertIfNotAfter(',', ', ', '[[(][^]]\+')
HTH,
*(\s*\)\@<=\(\%[const]\|const\s*[a-zA-Z:_]\+\s*\)\%#\(\s*)\)[EMAIL
PROTECTED]/
syn match cppEditedCatch
\ /\(catch\s*(\s*\)\@<=[a-zA-Z:_]\+\s*\%[const]\=\%#\(\s*)\)[EMAIL
PROTECTED]/
hi def link cppBadCatchSpellBad
" hi def link cppEditedCatch
endif
-- >% ---
Thanks in advance
--
Luc Hermitte
http://hermitte.free.fr/vim/
ROTECTED]&)]*/
--
Luc Hermitte
copy and paste them.
The main code is defined in plugin/common_brackets.vim, the filetype
(C&C++) specializations beeing in ftplugin/c/c_brackets.vim.
But I'm not sure this is the best way to define macros to q/, qq/,
... I think InsertSeq() is more adapted to the expansion of
to have an imapping to , or even
a context sensitive abbreviation that replace "case" with
"case:\n<+code+>\nbreak<++>;" outside string- and comment-contexts.
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
is the first word in the line.
May be, you can look into InsertIfNotAfter() that I define at the end
of ftplugin/cpp/cpp_set.vim (check the newly uploaded lh-cpp.tar.gz
tarball archive). I use it to define the abbreviation for `namespace'
and the mapping on .
What you will need is to
#x27;', 1, 'if ')
vnoremap if
\ @=Surround('if (', '!cursorhere!) {\n!mark!\n}!mark!',
\ 0, 1, '', 1, 'if ')
nmap if Vif
nmap if Vif
" }}}
...
--
Luc Hermitte
want to use the same behaviour as the
one binded to another filetype. It's no big deal. But it is something we must
not forget. It can be done with the forwarding ftplugin (the one that sets the
comment characters, and that sources c ftplugins).
--
Luc Hermitte
guess on some *nix, we can always do a
:let vimpid = libcallnr("libc.so", "getpid", "")
:let vimpath = matchstr(system('pmap '.vimpid.' | head -2 | tail -1')
\ 'someregex')
On windows, (with the perl module when vim is not in the $path) I'm
looking for vim in the latest directory in $VIM (don't forget the
versionning scheme don't follow the lexical order;
i.e.: vim70 > vim63b > vim63 > vim62)
> " add your tasks here
> fun! BackgroundJobHasStarted()
Script local functions is often a better default choice.
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
se
- &path, &sw, &tw
- &expandtabs that must be different for Makefiles
- compiler settings (the makefiles used and the filter applied are not
the same from one project to another, and sometimes even within a
particular subproject)
--
Luc Hermitte
http://hermitte.free.fr/vim/
like :find, search for files in 'path',
and also:
- ask us which file to open (if several match)
- (v)split-open in a new windows the file chosen.
Now, I set my 'path' on a projects basis. And quite exclusively use
SearchInRuntime and a.vim to search and open my projects files.
--
Luc Hermitte
http://hermitte.free.fr/vim/
`try', `for', ... in the complete form (with
brackets, placeholders, ...) when not within comment/string literal
contexts.
I know there are a lot of similar [2] solutions out there.
HTH,
[1] <http://hermitte.free.fr/vim/ressources/lh-cpp.tar.gz> (I have to
upload the UTF-8 friendly
the idea of changing the colorscheme. This is somehow more
efficient than the :echo I was doing.
As an improvment, it could be interresting to redirect stderr as well.
[1] <http://hermitte.free.fr/vim/ressources/lh-BTW.tar.gz> (still in an
alpha stage.)
--
Luc Hermitte
http://hermitte.free.fr/vim/
")
returns 1.
I guess I will have to forget about doing stuff like
fun! s:Foo()
return "foo"
endf
fun! s:Bar()
" 85 is the current scriptname
return "bar\=\85_Foo()\bar"
" return iconv("bar\=\85_Foo()\bar",
" \ 'latin1', &encoding)
endf
inoremap bfb =Bar()
--
Luc Hermitte
http://hermitte.free.fr/vim/
Mikolaj Machowski <[EMAIL PROTECTED]> wrote:
> Dnia wtorek, 16 maja 2006 23:35, Luc Hermitte napisa³:
> > The problem has existed for a long time. The iconv() workaround works
> > correctly with vim 7.0.012 on linux, but not with vim 7.0.000 (default
> > win32 build)
Yakov Lerner <[EMAIL PROTECTED]> wrote:
> On 5/17/06, Luc Hermitte <[EMAIL PROTECTED]> wrote:
> > I have a problem with an old hack that works fine in latin1, but starts
> > to cause problems in UTF-8.
> > [...]
> > What is quite odd is that I have a wo
quot;' .
\ substitute(m, '<\(.\{-1,}\)>', '"."\\<\1>"."', 'g') . '"'
if has('iconv')
" uncomment the following line to activate the workaround on linux
" let m = iconv(m, 'latin1', &encoding)
endif
endif
return 'bar'.m.'bar'
endfunction
inoremap bfb =bar()
--- >%
--
Luc Hermitte
http://hermitte.free.fr/vim/
OpenVimrc()
if (0==strlen(bufname('%'))) && (1==line('$')) && (0==strlen(getline('$')))
" edit in place
exe "e ".g:vimrc
else
exe "sp ".g:vimrc
endif
endfunction
" }}}
" --- >% --
HTH,
--
Luc Hermitte
http://hermitte.free.fr/vim/
would be needed? Any ideas, anyone?
Don't forget enums.
Consider using something that really understands C++ -- templates can be very
tricky when it comes to completion.
--
Luc Hermitte
jump to an already opened buffer)
HTH,
--
Luc Hermitte
76 matches
Mail list logo