Wikia

Vim Tips Wiki

Spiiph

194 Edits since joining this wiki
December 26, 2008
Revision as of 12:59, January 15, 2013 by 71.12.10.229 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
| User:Spiiph

Details on showmarks plugin comments? Edit

You left a comment on Using marks:

showmarks works rather poorly and interferes with other commands in nasty ways in Vim 7.x.

Can you please elaborate? I've privately made some fixes to it and tried sending a patch to the author, but never received a reply. I'm contemplating whether it's worth publishing my enhancements; unfortunately, the vim.org interface doesn't allow to "take over" a script, so I would have to publish a new forked version. -- Inkarkat 14:49, 30 July 2009 (UTC)

The first problem I noticed was how using :vimgrep in conjunction with showmarks.vim displayed every file it was searching through, because the plugin had some BufRead :autocmd forcing the buffer to be displayed. That's when I realised that the quality of the plugin was rather poor. I fixed that, but never bothered to contact the author. I think it'd be best to rewrite the whole thing, because it's a pretty nifty idea. (Spiiph 13:34, 2 August 2009 (UTC))
Heh, that's the sort of thing for which I set up a cabbr to prepend "noautocmd" to my vimgrep commands. Although for me, it was the MRU plugin (which has been fixed since) which had the bad bufread autocmd. I imagine it's a fairly common mistake! --Fritzophrenic
The last released version is from 2004, no wonder that there are some problems. But unless someone actually rewrites the script, it's the best we've got. We could both paste our fixes here in the Wiki, but I don't like (mis-)using the Wiki as a poor source code management utility, especially with Vimscript spanning multiple pages. -- Inkarkat 07:05, 3 August 2009 (UTC)

CategoriesEdit

Thanks for all your recent work! I removed your comment from All the right moves because I am replying here with some additional info.

If you put "[[Category:Getting started]]" in a page, the MediaWiki software will assign the page to category "Getting started" (and the text is not displayed). If you want to link to the category, you enter wikitext "[[:Category:Getting started]]" which renders as Category:Getting started.

Traditionally, categories are added to a page by entering "[[Category:X]]" at the bottom of a page (it can be anywhere; the bottom is a convention). However, that is where we want users to add comments, and new users are totally confused by the category text. Therefore, I modified Template:TipImported and Template:TipNew and Template:TipProposed so that up to six categories can be entered into the template. View the wikitext for VimTip16 to see an example where two categories have been entered. You can add additional lines, for example, "|category3=Searching", up to six lines.

I'm just mentioning all this detail so you have a better understanding of the arrangement. In practice, you can use the traditional method to add a category, or you can use the new fangled Wikia extension that puts that irritating "Add category" button at the bottom of the page (using that button is exactly the same as adding a category line to the bottom of the page). Periodically (every couple of months or possibly more frequently), I use a script to download all tips, then other scripts fix certain navigation features (the "next" link in the heading line, and a little more), and move any categories into the template in alphabetical order, and upload the results. Here is an example edit that made such a change (the script also removes trailing whitespace from each line which explains the other differences). JohnBeckett 02:22, 6 August 2009 (UTC)

IndentingEdit

I'm hoping for more progress on cleaning all the indent tips, and I'm hoping you (and Fritzophrenic) will notice the Comments section at Restoring indent after typing hash where I need a bit of help. Thanks. JohnBeckett 11:56, 26 August 2009 (UTC)

Been a bit busy the last two weeks, but I hope to get some time to clean up some more, and add more information. In particular, I want to add proper descriptions for the 'tabstop', 'softtabstop', 'shiftwidth' and 'expandtab' options, and how they interact. These options are responsible for a lot of newbie mistakes.

wiki article/discussion pages Edit

On other wikis I use comments about changes to an article are put in the discussion page.

I Changed <Esc> to <esc> since this it referring to key strokes ( most keyboards i have seen many usually have lowercase letters on the special keys) rather than the way "simulated" keystrokes are entered into a script...

But, as you wish... DG12 13:07, December 6, 2009 (UTC)

We don't use the Talk pages here. (Ask User:JohnBeckett why.) (Spiiph 15:37, December 6, 2009 (UTC))

"Using :mkvimrc to create .vimrc isn't a terribly good idea, since it saves mappings and abbreviations setup by plugins. It can be useful to copy currently set options to .vimrc however. (Spiiph 14:51, 27 July 2009 (UTC))"

So what is a better solution?

Around Wikia's network

Random Wiki