Re: Java syntax folding question
Ian, On 3/15/07, Ian Tegebo <[EMAIL PROTECTED]> wrote: You might try searching vim scripts at: http://www.vim.org/search.php A cursory search yields a couple possibilities: http://www.vim.org/scripts/script.php?script_id=588 http://www.vim.org/scripts/script.php?script_id=1205 Thanks for the pointer. The 1205 script looks like what I need. I actually searched there for "java syntax folding" but this didn't show up in the first few pages (cos of the rating I think). Now I tried just searching for "java.vim" and it showed. I'll keep that in mind for the next time. Ian Tegebo Sundar
Re: Java syntax folding question
vr.sundar wrote: Hi, On 3/15/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: You didn't miss any step. It is just that $VIMRUNTIME/syntax/java.vim doesn't define any folding syntax items. Thanks for your response. Do you know if there is a newer version (or another version) of java.vim available somewhere that does define the folding syntax items? Tony. Sundar The version in my Vim distribution is dated 2006 Apr 30. You might want to check the maintainer's site or contact the maintainer (see the first few lines of the script). Best regards, Tony. -- hundred-and-one symptoms of being an internet addict: 115. You are late picking up your kid from school and try to explain to the teacher you were stuck in Web traffic.
Re: Java syntax folding question
Hi, On 3/15/07, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: You didn't miss any step. It is just that $VIMRUNTIME/syntax/java.vim doesn't define any folding syntax items. Thanks for your response. Do you know if there is a newer version (or another version) of java.vim available somewhere that does define the folding syntax items? Tony. Sundar
Re: Java syntax folding question
vr.sundar wrote: Hi, I using vim 7.0 on Windows XP and have just started trying to use vim with java source files. I want to have folding enabled based on syntax. From reading the help document, syntax highlighting is enabled and I set the foldmethod to syntax. But when I try to close a fold (from inside a method), I get a "No fold found" error message. I verified the syntax with "set syntax" and vim reported syntax=java. I tried the same for foldmethod and got foldmethod=syntax. I also verified that there is a java.vim under the $VIMRUNTIME\syntax. (though when I searched in this file for "fold" I didn't find anything). Am I missing some step? If anyone can help me with this to get folding working, that be greatly appreciated. thanks sundar You didn't miss any step. It is just that $VIMRUNTIME/syntax/java.vim doesn't define any folding syntax items. Best regards, Tony. -- What the large print giveth, the small print taketh away.
Re: weird path string on TAB line
lin q wrote: Hi, I am using VIM7 on cygwin on WinXP. If I use vim -p file1 file2 to open my files, each tab has the file name, file1 and file2. This is right. If I use "vim --remote-tab-silent file3" to open file3, then the tab of file3 has some path crumpled before file3 something like, \p\E\e\J\file3, it looks abbreviated path, it looks ugly. Any way I can get rid of the path, only file name on the tab? Yes, with a custom tabline. The following (from my vimrc) might inspire you to write your own: if exists("+guioptions") set go-=e endif if exists("+showtabline") function MyTabLine() let s = '' let t = tabpagenr() let i = 1 while i <= tabpagenr('$') let buflist = tabpagebuflist(i) let winnr = tabpagewinnr(i) let s .= '%' . i . 'T' let s .= (i == t ? '%1*' : '%2*') let s .= ' ' let s .= i . ':' let s .= winnr . '/' . tabpagewinnr(i,'$') let s .= ' %*' let s .= (i == t ? '%#TabLineSel#' : '%#TabLine#') let file = bufname(buflist[winnr - 1]) let file = fnamemodify(file, ':p:t') if file == '' let file = '[No Name]' endif let s .= file let i = i + 1 endwhile let s .= '%T%#TabLineFill#%=' let s .= (tabpagenr('$') > 1 ? '%999XX' : 'X') return s endfunction set stal=2 set tabline=%!MyTabLine() map :tabnext map! :tabnext map:tabprev map! :tabprev endif Best regards, Tony. -- Fortune's Real-Life Courtroom Quote #18: Q: Are you married? A: No, I'm divorced. Q: And what did your husband do before you divorced him? A: A lot of things I didn't know about.
Re: weird path string on TAB line
On 3/15/07, lin q <[EMAIL PROTECTED]> wrote: Hi, I am using VIM7 on cygwin on WinXP. If I use vim -p file1 file2 to open my files, each tab has the file name, file1 and file2. This is right. If I use "vim --remote-tab-silent file3" to open file3, then the tab of file3 has some path crumpled before file3 something like, \p\E\e\J\file3, it looks abbreviated path, it looks ugly. Any way I can get rid of the path, only file name on the tab? The abbreviated path is the way it was chosen to be by default. If you'd like to change it, read :h setting-tabline
Java syntax folding question
Hi, I using vim 7.0 on Windows XP and have just started trying to use vim with java source files. I want to have folding enabled based on syntax. From reading the help document, syntax highlighting is enabled and I set the foldmethod to syntax. But when I try to close a fold (from inside a method), I get a "No fold found" error message. I verified the syntax with "set syntax" and vim reported syntax=java. I tried the same for foldmethod and got foldmethod=syntax. I also verified that there is a java.vim under the $VIMRUNTIME\syntax. (though when I searched in this file for "fold" I didn't find anything). Am I missing some step? If anyone can help me with this to get folding working, that be greatly appreciated. thanks sundar
weird path string on TAB line
Hi, I am using VIM7 on cygwin on WinXP. If I use vim -p file1 file2 to open my files, each tab has the file name, file1 and file2. This is right. If I use "vim --remote-tab-silent file3" to open file3, then the tab of file3 has some path crumpled before file3 something like, \p\E\e\J\file3, it looks abbreviated path, it looks ugly. Any way I can get rid of the path, only file name on the tab? _ Rates near 39yr lows! $430K Loan for $1,399/mo - Paying Too Much? Calculate new payment http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18226&moid=7581
Re: Removing tilde characters in front of non-existing lines?
Richard van der Leeden wrote: François Ingelrest-2 wrote: Hello all, I'm displaying the line number in front of each line, so the tilde characters in front of non-existing lines are useless for me. Is there a way to not display them? You can change the colour of 'nontext' items (see :help nontext) to be the same as the background colour - e.g if your background is black do: :hi NonText cterm=NONE ctermbg=black ctermfg=black gui=NONE guibg=black guifg=black ...or, to be independent of colorscheme settings: hi clear NonText hi link NonText Ignore au ColorScheme * hi clear NonText | hi link NonText Ignore This, of course, would also hide other instances of NonText highlight, such as some of what is displayed because of 'list' / 'listchars' settings. Another possibility is gg^O (i.e., hit g twice, then Ctrl-O, all of them in Normal mode) which will adjust the display so that none (or, if the file is shorter than the window, as few as possible) of the "tilde" lines are showing. Best regards, Tony. -- "I have the world's largest collection of seashells. I keep it scattered around the beaches of the world ... Perhaps you've seen it. -- Steven Wright
Re: How to convert all the buffers into tab
- Original Message Subject: Re: How to convert all the buffers into tab > I usually have such problem: in VIM7 > i have many files opened in old way, meaning they are in buffers, now I want > to have them opened in TAB, each tab has one buffer. I think you want: :tab ball rd Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097
ctrl-P is slow when set path for ctrl-W + ctrl F
Hi, I'm trying to use ctrl-W + ctrl F to enter header file. To do this I have to set path. However, after I set path to the directory of the header files, ctrl-P (auto-completion) getting very slow (it could take 1 sec to search for one header file). I'm wondering if there is anything wrong with my system. Is there any walk around? Thanks, Peng
Re: How to convert all the buffers into tab
* lin q <[EMAIL PROTECTED]> [070315 19:50]: > Hi, > I usually have such problem: in VIM7 i have many files opened in old way, > meaning they are in buffers, now I want > to have them opened in TAB, each tab has one buffer. > > Is there a simple way to do this? Take a look at thisi, it may help: http://www.vim.org/scripts/script.php?script_id=1639 http://www.vim.org/tips/tip.php?tip_id=1317 > > Thanks. > > _ > Rates near 39yr lows! $430K Loan for $1,399/mo - Paying Too Much? Calculate > new payment > http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18226&moid=7581
Re: Removing tilde characters in front of non-existing lines?
Though it was obvious, I did not think about playing with the colors. Thank you everyone! On 3/15/07, Michael Brailsford <[EMAIL PROTECTED]> wrote: Or the more general solution which will work for any bg/fg combination: :hi nontext ctermfg=bg guifg=bg cterm=NONE gui=NONE - Original Message From: Richard van der Leeden <[EMAIL PROTECTED]> To: vim@vim.org Sent: Thursday, March 15, 2007 12:27:41 PM Subject: Re: Removing tilde characters in front of non-existing lines? François Ingelrest-2 wrote: > > Hello all, > > I'm displaying the line number in front of each line, so the tilde > characters in front of non-existing lines are useless for me. Is there > a way to not display them? > > You can change the colour of 'nontext' items (see :help nontext) to be the same as the background colour - e.g if your background is black do: :hi NonText cterm=NONE ctermbg=black ctermfg=black gui=NONE guibg=black guifg=black -- View this message in context: http://www.nabble.com/Removing-tilde-characters-in-front-of-non-existing-lines--tf3409626.html#a9499387 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Removing tilde characters in front of non-existing lines?
Or the more general solution which will work for any bg/fg combination: :hi nontext ctermfg=bg guifg=bg cterm=NONE gui=NONE - Original Message From: Richard van der Leeden <[EMAIL PROTECTED]> To: vim@vim.org Sent: Thursday, March 15, 2007 12:27:41 PM Subject: Re: Removing tilde characters in front of non-existing lines? François Ingelrest-2 wrote: > > Hello all, > > I'm displaying the line number in front of each line, so the tilde > characters in front of non-existing lines are useless for me. Is there > a way to not display them? > > You can change the colour of 'nontext' items (see :help nontext) to be the same as the background colour - e.g if your background is black do: :hi NonText cterm=NONE ctermbg=black ctermfg=black gui=NONE guibg=black guifg=black -- View this message in context: http://www.nabble.com/Removing-tilde-characters-in-front-of-non-existing-lines--tf3409626.html#a9499387 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Removing tilde characters in front of non-existing lines?
François Ingelrest-2 wrote: > > Hello all, > > I'm displaying the line number in front of each line, so the tilde > characters in front of non-existing lines are useless for me. Is there > a way to not display them? > > You can change the colour of 'nontext' items (see :help nontext) to be the same as the background colour - e.g if your background is black do: :hi NonText cterm=NONE ctermbg=black ctermfg=black gui=NONE guibg=black guifg=black -- View this message in context: http://www.nabble.com/Removing-tilde-characters-in-front-of-non-existing-lines--tf3409626.html#a9499387 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Removing tilde characters in front of non-existing lines?
I'm displaying the line number in front of each line, so the tilde characters in front of non-existing lines are useless for me. Is there a way to not display them? While I don't think there's a way to turn them off completely, you can set them to be the same color as the background color with something like :hi NonText ctermfg=black guifg=black (assuming your default background color is black) It does have side-effects, as it changes all "nontext", so that includes the tildes, but also includes the 'showbreak' characters and the continuation "@" characters, as detailed at :help hl-NonText Hope this helps, -tim
Removing tilde characters in front of non-existing lines?
Hello all, I'm displaying the line number in front of each line, so the tilde characters in front of non-existing lines are useless for me. Is there a way to not display them?
Re: gvim hangs when _vimrc loaded and with syntax on
zzapper said... > "A.J.Mechelynck" <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > > > zzapper wrote: > >> the solution (one of them anyway) > >> > >> In the directory containing gvim.exe create a dummy file tcl84.dll > >> > >> touch tcl84.dll > >> > > > > This will completely disable the TCL interface, won't it? > > > > Tony. > spose so (sorry dont use it) > > or > emergency solution disable syntax/vim.vim > > mv vim.vim vim.dis > > I used to have a patch for vim.vim > > "before line "if trytcl" in vim.vim > let trytcl= 0 Looking at the code, it seems like an attempt has been made to fix it, but it doesn't work here. " [-- tcl --] {{{3 if has("win32") || has("win95") || has("win64") || has("win16") " apparently has("tcl") has been hanging vim on some windows systems with cygwin let trytcl= (&shell !~ '\%(\\|\\)\%(\.exe\)\=$') || g:vimembedscript else let trytcl= 1 endif if trytcl -- Cheers, Marc
Re: How to display a omni-comletion menu from a vim script function?
On 3/15/07, Thomas <[EMAIL PROTECTED]> wrote: Does somebody have an idea of how to display the menu? I've been meaning to get around to doing this myself but haven't done it. There's an example under :help complete-functions
Re: How to display a omni-comletion menu from a vim script function?
On 3/15/07, Thomas <[EMAIL PROTECTED]> wrote: Does somebody have an idea of how to display the menu? I've been meaning to get around to doing this myself but haven't done it. There's an example under :help complete-functions
Netrw go up dir command
Hi - I just downloaded the non-Cream pre-built Vim for Windows (version 7.0.215). The "go up" command (-) in the Netrw plugin no longer seems to work. Neither the - command or putting the cursor over the ../ and hitting return does anything anymore. Any ideas? Thanks.
Re: register quoteplus - addition
[EMAIL PROTECTED] wrote: In addition to my posting yesterday, i want to add: - I`m working under kde and gnome (the actually versions in the distribution opensuse 10.2; I`m now not at home, therefore can`t say the number). - If I do a selection in vim with the mouse, I can past it, i. e., in an web browser. But I activate linenumbers in vim an the selection via mouse includes the numbers - and the pasting too. That`s awful. - If I do a selection via the keybord (my normal way) with and cursor up/down, I get the really text without the linenumbers; but I cannot put the selection in the quoteplus-register with <+>. Under SuSE 10.1 all works. But I not remember, how I compiled vom that time. Anynoe knows, where`s the reason? Thanks, Dada I'm using openSUSE 10.2 too, with kde 3.3.5 "release 45.2" and I don't have any problems with "+. I compile Vim according to what is described at http://users.skynet.be/antoine.mechelynck/vim/compunix.htm. My options are set so, that when selecting with the mouse (which I don't usually do) I end up in Select mode. Esc gv brings me back to (standard) Visual mode, and "+y yanks the text without the linenumbers from the 'number' option, as can be seen (e.g.) by Ctrl-V or "Edit => Paste" in Thunderbird (my mail client). Normally I too use the keyboard to select. After V (uppercase, i.e., shift-v) followed by cursor up/down movements I'm in linewise visual mode; again, "+y allows me to paste (full lines without line numbers) in Thunderbird. Do you have the flags a and/or A in 'guioptions', what is your 'clipboard' option set to? Mine is empty, and I have guioptions=gimrLTt -- my vimrc includes if exists("+clipboard") set clipboard= endif if exists("+guioptions") set go-=a go-=e go+=t endif See :help modeless-selection :help modeless-and-clipboard Best regards, Tony. -- RULES OF EATING -- THE BRONX DIETER'S CREED (1) Never eat on an empty stomach. (2) Never leave the table hungry. (3) When traveling, never leave a country hungry. (4) Enjoy your food. (5) Enjoy your companion's food. (6) Really taste your food. It may take several portions to accomplish this, especially if subtly seasoned. (7) Really feel your food. Texture is important. Compare, for example, the texture of a turnip to that of a brownie. Which feels better against your cheeks? (8) Never eat between snacks, unless it's a meal. (9) Don't feel you must finish everything on your plate. You can always eat it later. (10) Avoid any wine with a childproof cap. (11) Avoid blue food. -- Richard Smit, "The Bronx Diet"
Re: gvim hangs when _vimrc loaded and with syntax on
zzapper wrote: marc <[EMAIL PROTECTED]> wrote in news:MPG.20633b8518c74016989a91 @news.gmane.org: Thanks for the assist, Tony, but Greg hit the nail on the head. Hi problem you cannot edit any file *.vim I originated the thread that Greg responded to, but had since forgotten the solution (one of them anyway) In the directory containing gvim.exe create a dummy file tcl84.dll touch tcl84.dll or gvim tcl84.dll This will completely disable the TCL interface, won't it? Best regards, Tony. -- Conscience is what hurts when everything else feels so good.
How to display a omni-comletion menu from a vim script function?
Hi, I would like to use the new vim7 drop-down menu that is used with the new omni-completion from a vim script in order to let the user select an item from a list. I figured I could temporarily set &omnifunc and use this to build the list. But I wasn't able to find a way to trigger the display of the menu from within a vim script. Does somebody have an idea of how to display the menu? Say, we have: fun! MyComplete(findstart, base) ... endf fun! DoSomething() let omnifunc = &omnifunc let &omnifunc = 'MyComplete' try +++DISPLAY MENU+++ return 0 finally let &omnifunc = omnifunc endtry endf How would the "DISPLAY MENU" part look like? Regards, Thomas.
Re: gvim hangs when _vimrc loaded and with syntax on
A.J.Mechelynck said... > marc wrote: > Here are a few "ideas". Nothing precise yet, just a few hints. Thanks for the assist, Tony, but Greg hit the nail on the head. -- Cheers, Marc
Re: gvim hangs when _vimrc loaded and with syntax on
Greg Dunn said... > > The symptoms are that when I load _vimrc into a buffer, and _vimrc > > contains > > > > syntax on > > Does this thread help: > > http://tech.groups.yahoo.com/group/vim/message/76286 > > Essentially, vim is finding an incompatible tcl84.dll in your path > (probably from cygwin, if you have that installed). Assuming you > don't need tcl support, putting an empty file named tcl84.dll earlier > in the path should fix things up. Remarkable! Thanks a lot. So, do you know why there is a check for tcl? And why does it only bomb on _vimrc? Btw, I upgraded to the latest, 7.0.215, and the problem persists. Thanks again. -- Cheers, Marc
Adjusted list of features to vote on
Greetings, Vim users! Vim sponsors and registered Vim users can vote for features. The result can be seen here: http://www.vim.org/sponsor/vote_results.php Vim 7.0 has added a number of features that still appeared in the voting list. I have now updated the list to reflect the Vim 7.0 features. Removed features: - add tabbed windows - add undo tree (be able to go back to any previous situation) - add a ":grep" command that does not use an external command - add option to highlight the screen line (and column) of the cursor Changed features: - "add intelligent completion" -> "add more and better omni completion plugins" - "add more features to Vim scripting (arrays, lists, sorting, etc.)" -> "add more features to Vim scripting" - "add more autocommand events (for ":cd", start Insert mode, etc.)" -> "add more autocommand events (for ":cd", jump to tag, etc.)" - "add on-the-fly spell checking" -> "improve on-the-fly spell checking" If you voted for one of these, please go to the voting pages and adjust your votes: http://www.vim.org/sponsor/vote.php You need to login. Happy Vimming! -- Have you heard about the new Barbie doll? It's called Divorce Barbie. It comes with all of Ken's stuff. /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Find non - ASCII characters
> I'm using vim to edit (La)TeX files. > Some non-ASCII characters from "wild copy/paste" give problems at the > compilation (like the character -> ' <- ) and it takes for ever to > identify them. > I'm sure there is a vim command to "smoke them out" ? I'm not sure you've clearly defined non-ASCII characters (as it looks like the character you point out is ASCII 0x27, but I might be missing something), but if you mean things over 0x7f then you can do something like :%s/[^ -\x7f]//g to remove them. I don't know if you want to replace them with something smarter, as that may be more desired. Or, if you just want to find them, you can use /[\x80-\xff] This just uses the standard set-of-characters notation described at :help /[ though it does require that "the 'l' flag is included in 'cpoptions'" (text from the above help) to get the \xNN notation. Instead of the ranges given above (or in addition), there are some posix character classes, so you can do things like /[^[:print:]] or /[[:cntrl:]] to find classes of offenders. Hope this helps, -tim
Find non - ASCII characters
Hi everyone, I'm using vim to edit (La)TeX files. Some non-ASCII characters from "wild copy/paste" give problems at the compilation (like the character -> ' <- ) and it takes for ever to identify them. I'm sure there is a vim command to "smoke them out" ? Thx in advance, Regards, Lionel
Re: complete=custom for path including spaces
On 3/15/07, Bram Moolenaar <[EMAIL PROTECTED]> wrote: Raphael Bauduin wrote: > I'm writing a command with a custom completion, and it works fine, > except when there's a space in the "path" to complete. > > For example, without spaces everything works: >:Radiant edit pages/ho > will complete to >:Radiant edit pages/home/ > which I can further complete: >:Radiant edit pages/home/fi > to >:Radiant edit pages/home/first-post/ > > If there's a space, it doesn't work: >:Radiant edit pages/Ho > is completed to >:Radiant edit pages/Home\ Page/ > But now, this >:Radiant edit pages/Home\ Page/A > doesn't complete it, although my completion function returns what is > expected as completion: >pages/Home\ Page/About >pages/Home\ Page/Articles > > What am I missing here? Did you try returning the matches without the backslash? I'm 99% sure I tried it, but your question is seeding doubts :-) You can also try using "customlist", then Vim will not filter the results. The backslash may confuse the filtering. I did that indeed (but from further tests, the following approach should also work when using custom in place of customlist), and only return the part after the last space. Eg, when completing :Radiant pages/Home Page/A the returned list is ["Page/About","Page/Articles"] I'll post a notice when I get a satisfying result. Cheers Raph -- Web database: http://www.myowndb.com Free Software Developers Meeting: http://www.fosdem.org
Re: Get date and filename as plain text
Wolfgang Schmidt schrieb: Hi, I don't know about the filename part, but you could insert a date with the following mapping: inoremap @date =strftime("%d.%m.%Y") Cheers, Wolfgang Eric Leenman wrote: Hi, Is it possible to make an inoremap that inserts the date as text and the filename as text? For example: inoremap @date {insert_date_as_text()} inoremap @filename {insert_filename_as_text()} Rgds, Eric " including path :inoremap @filename =expand("%:p") " without path: :inoremap @filename =expand("%:t") :h i_CTRL-R :h filename-modifiers :h expand() If there is still no filename, nothing is inserted. Andy -- EOM ___ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Re: Get date and filename as plain text
Hi, I don't know about the filename part, but you could insert a date with the following mapping: inoremap @date =strftime("%d.%m.%Y") Cheers, Wolfgang Eric Leenman wrote: Hi, Is it possible to make an inoremap that inserts the date as text and the filename as text? For example: inoremap @date {insert_date_as_text()} inoremap @filename {insert_filename_as_text()} Rgds, Eric _ Get a FREE Web site, company branded e-mail and more from Microsoft Office Live! http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/
problem of ftplugin lua.vim
Perhaps it's a bug of lua.vim. In line 19, it says 'setlocal cms="--%s"', but cms option couldn't be lead with a '"' or it will be null. I simply remove the two '"' in this line. Is it OK? Thanks. Xi Juanjie