Wikia

Vim Tips Wiki

JohnBeckett

Admin
5,003 Edits since joining this wiki
June 6, 2007
(Difference between revisions) | User:JohnBeckett
(Links on copy/paste.)
(Archive.)
 
(8 intermediate revisions by 5 users not shown)
Line 2: Line 2:
 
You might like to add <tt><nowiki>~~~~</nowiki></tt> to insert your name and the date.
 
You might like to add <tt><nowiki>~~~~</nowiki></tt> to insert your name and the date.
   
Archives: [[/Archive1|'''1''']], [[/Archive2|'''2''']], [[/Archive3|'''3''']], [[/Archive4|'''4''']]
+
Archives: [[/Archive1|'''1''']], [[/Archive2|'''2''']], [[/Archive3|'''3''']], [[/Archive4|'''4''']], [[/Archive5|'''5''']]
 
==Use of tt==
 
[[User:Fritzophrenic|Fritzophrenic]] has pointed out that the <code>&lt;tt&gt;</code> element we use in most tips is not HTML5 compliant. Relevant links:
 
*[[w:c:community:User blog:Ohmyn0/Making your wiki HTML5 compliant|Wikia blog on HTML5 compliance]]
 
*[http://www.w3.org/TR/html5-diff/#obsolete-elements W3C: tt is obsolete]
 
 
It is likely that <code>&lt;tt&gt;</code> will continue to work, possibly forever, but it is not good to use deprecated/obsolete features, so we are planning to use <code>&lt;code&gt;</code> instead.
 
 
Around 670 tips use <code>&lt;tt&gt;</code> (488 don't, which is puzzling, and
 
205 use it once only). I think it would be best if I convert all the tips using my bot, so we don't have an extended period where there is a mixture of styles, with some tips using tt and some using code. Doing that would make future editing slightly easier, and would make diffs for future edits easier to interpret because they would not show irrelevant changes if an edit changes something, ''and'' changes all the tt to code.
 
 
Assuming no one sees a problem with that, I'll convert a batch of around 50 tips, then pause for evaluation. It might be desirable to tweak [[MediaWiki:Common.css]] to set <code>&lt;code&gt;</code> how we want it, and possibly include "no wrap".
 
 
According to Firebug when using a Monobook skin, Wikia's style came from [http://slot1.images.wikia.nocookie.net/__cb55747/common/skins/monobook/main.css?55747 here], with differences:
 
<pre>
 
<code> <tt>
 
font-family monospace monospace
 
font-size 12.7px 13px
 
font-weight 400 400
 
font-style normal normal
 
font-size-adjust none none
 
color #000000 #000000
 
line-height 19.05px 16px
 
vertical-align baseline text-bottom
 
background-color #F9F9F9 #FFFFFF
 
</pre>
 
 
While the difference is minuscule, I think I prefer the tt size and background (could be convinced either way). Perhaps the size could be slightly bigger without negative consequences like changing the line spacing?
 
 
It would be good to test how tips look in a variety of browsers, and in a variety of skins. I did a quick test and noticed that when not logged on, the stupid rich text editor is used (and it does not show a proper preview). [[User:JohnBeckett|JohnBeckett]] 08:28, July 8, 2012 (UTC)
 
 
:I added a "white-space: pre" to the CSS rules for both <code>&lt;tt></code> and <code>&lt;code></code>, which I did mainly so it doesn't wrap, but it actually means we can do this now: <code>
 
it's an inline element
 
but we can break it on multiple lines
 
</code> and continue as if nothing had happened. I could have also used just "nowrap" instead of "pre" if we don't like the multi-line or multi-space capability.
 
:I experimented a little on [[User:Fritzophrenic/Sandbox]], and made the text inside <code>&lt;code></code> a little bit bigger than the surrounding text. It doesn't seem to screw up line spacing on Firefox, Chromium, or Opera on Ubuntu at least. I actually kind of like the idea of a slightly different background color. I don't see that on the default Oasis skin. I think it would make it stand out a little better, especially for single-letter commands like "press <code>u</code> to undo", which could instead look like "press <code style='background-color: #c0ffee'>u</code> to undo" to make it obvious the u isn't part of the surrounding text. Even more important is "press <code style='background-color: #c0ffee'>.</code> to repeat".
 
:--[[User:Fritzophrenic|Fritzophrenic]] 18:46, July 8, 2012 (UTC)
 
 
::Oddly enough the wikimedia software seems to have inserted a full <code>&lt;pre></code> element into the middle of the multi-line <code>&lt;code></code> element rather than just using the CSS I defined. I suppose normally people don't want to show that as an inline-block or whatever would normally happen (I'm not actually certain). Incidentally My successive lines starting with <nowiki>:</nowiki> have also been converted into a <code>&lt;dl></code> element, which is a VERY strange (and I would like to point out, very non-semantic, which was the driving force behind removing <code>&lt;tt></code>) element to use in this situation.
 
::--[[User:Fritzophrenic|Fritzophrenic]] 18:52, July 8, 2012 (UTC)
 
 
I have processed 62 tips, converting them to use &lt;code&gt;. See [[Errorformats#flex]] where the first line after the "flex" heading ends with a long &lt;code&gt; block that includes spaces, and is useful to show that such text does not wrap. Following are the tips that contain the greatest number of &lt;code&gt; elements (tip 1465 has the most).
 
*[[VimTip42|42 Using marks]]
 
*[[VimTip242|242 Search across multiple lines]]
 
*[[VimTip382|382 Search and replace in multiple buffers]]
 
*[[VimTip882|882 Learn to use help]]
 
*[[VimTip1465|1465 Introduction to display editing using vi]]
 
*[[VimTip1521|1521 Automatically Update Copyright Notice in Files]]
 
*[[VimTip1561|1561 Creating your own syntax files]]
 
*[[VimTip1585|1585 File format]]
 
*[[VimTip1611|1611 Ranges]]
 
*[[VimTip1643|1643 Using undo branches]]
 
I will wait a day or so, then convert the rest of the tips. I am becoming happier with the idea of a background colour, so please experiment (it can always be changed). See [[VimTip1653]] where &lt;span> has been used to set a background colour for text "|view -". [[User:JohnBeckett|JohnBeckett]] 08:44, July 11, 2012 (UTC)
 
----
 
I have finished converting all tips from tt to code, and will do more pages in due course (proposed tips, scripts, etc). I haven't decided what to do with <code><nowiki>{{tt|...}}</nowiki></code>. See [[File format]] and [[Repeat last change]] for examples of where [[Template:tt]] is used (it's in a total of 51 tips). The problem with tt is that you have to use ugly workarounds with some text, so I am inclined to replace all the tt templates with code tags so only one method is used (and we do not need the no wrap feature of the tt template any more because the css for code is now doing that). Thoughts? [[User:JohnBeckett|JohnBeckett]] ([[User talk:JohnBeckett|talk]]) 12:01, July 13, 2012 (UTC)
 
 
==Diacritical signs==
 
Thanks for the explanations on [[Remove diacritical signs from characters]]. As you've probably noticed I'm new to wiki editing, and with the tips you gave I realized that I said "thanks" to a bot :D
 
 
All the best!<BR>
 
Marcmontu 16:51, July 18, 2012 (UTC)
 
:No problem, and the bot is me so that's fine. [[User:JohnBeckett|JohnBeckett]] ([[User talk:JohnBeckett|talk]]) 07:59, July 21, 2012 (UTC)
 
 
==New contributions==
 
The following have been created by someone using 83.x.x.x IPs ([[Special:Contributions/83.11.118.65|83.11.118.65]], [[Special:Contributions/83.11.124.68|83.11.124.68]], [[Special:Contributions/83.11.44.78|83.11.44.78]], [[Special:Contributions/83.25.156.198|83.25.156.198]], [[Special:Contributions/83.25.156.76|83.25.156.76]], [[Special:Contributions/83.25.252.114|83.25.252.114]]). There appears to be no way to communicate with the IP, and the discussion here is clear, so I will delete what needs to be deleted. The list was updated to include all pages at the time in following signature. [[User:JohnBeckett|JohnBeckett]] ([[User talk:JohnBeckett|talk]]) 03:16, July 30, 2012 (UTC)
 
 
;Pages
 
*[[Abbreviations]]
 
*[[Alt]]
 
*[[Bram Moolenaar]]
 
*[[Bugs]]
 
*[[Fonts]]
 
*[[Hlsearch]]
 
*[[MediaWiki]]
 
*[[Numeric pad]] (some of {{help|keycodes}})
 
*[[Operator]]
 
*[[Operatorfunc]]
 
*[[Sessions]]
 
*[[Space.vim]]
 
*[[Sparkup]]
 
*[[Special key codes]]
 
*[[Super]]
 
*[[Text objects]]
 
*[[Won't fix]]
 
 
*'''Redirects:''' [http://vim.wikia.com/wiki/Mappings?redirect=no Mappings], [http://vim.wikia.com/wiki/Super_star?redirect=no Super star]
 
 
*'''Scripts:''' [[Script:1682]], [[Script:1871]], [[Script:2136]], [[Script:2467]], [[Script:2666]], [[Script:2944]], [[Script:2973]], [[Script:3201]], [[Script:3742]], [[Script:3772]], [[Script:3922]], [[Script:4005]]
 
 
The script pages and redirects are ok although I would recommend that no more be created unless there is something useful to say. The other pages are unusual here and I doubt they are useful. The numeric pad stuff is the start of something helpful, but it should be somewhere else. Thoughts? To the IP: if you create an account you won't see adverts. [[User:JohnBeckett|JohnBeckett]] ([[User talk:JohnBeckett|talk]]) 07:59, July 21, 2012 (UTC)
 
:Also [[Special:Contributions/83.11.44.78|83.11.44.78]] created [[operator]] and some links to it. I say delete all the pages and replace any '''useful''' references to them with a simple <nowiki>{{help}}</nowiki> template to a related subject. --[[User:Fritzophrenic|Fritzophrenic]] ([[User talk:Fritzophrenic|talk]]) 15:30, July 23, 2012 (UTC)
 
::I have incorporated the new pages into the list above.
 
::I did wonder if there might be some reason for some of the pages, somewhat along the lines of "disambiguation" pages at Wikipedia. ''Perhaps'' some pages for likely search terms could be created, with the content being nothing more than links to tips, perhaps with a very brief precise. OTOH, there are hundreds of words that might make sense in Vim, and we can't maintain pages to them all, and I have lots of other work to do so it is unlikely to be me who fixes all these, so '''delete''' seems to be a quick solution. Also, the search function here (and in Google) is likely to give reasonable results, without needing a page with a one-word title.
 
::I left a message at [[Sessions]] and at the talk page of the last-used IP in the hope of getting them to notice this discussion. [[User:JohnBeckett|JohnBeckett]] ([[User talk:JohnBeckett|talk]]) 11:12, July 24, 2012 (UTC)
 
 
::: I don't have much experience with editing wikis, but I believe that information shouldn't be removed if it is not incorrect.
 
:::Maybe it could be somehow down-rated so it doesn't show up at the top of search results, but it may be a useful reference to someone that doesn't found useful information on the top search results. It can also be an incentive to people include information - it seems easier to add a few lines of information to an existing page than think about a page title, create it and then add the useful stuff. And these short pages could have some flag asking for new editors, so it become clear to readers that the page wasn't carefully reviewed.
 
::: If the page has too few information it could be added as a section of an existing page instead of deleted. -- Marcmontu 13:35, July 24, 2012 (UTC)
 
::::I think the problem is that the new pages don't seem to have ANY new information, just a few small notes with help links or plugins like somebody is placing their personal Vim cheat-sheet on the wiki broken into a bunch of tiny pages that don't add any value. For example, a search for "sessions" will bring up the newly created [[Sessions]] page, but also a ton of pages (including the [[Script:3150]] page linked from the [[Sessions]] page) which (if they deal with sessions) probably ought to include the {{help|:mksession}} link which is the only other content of the [[Sessions]] page. --[[User:Fritzophrenic|Fritzophrenic]] ([[User talk:Fritzophrenic|talk]]) 15:57, July 24, 2012 (UTC)
 
:::::I understand that there is very few content on these pages, but I still think its contents shouldn't be deleted - they are at least a start for a new topic, or can increment the contents of an existing page on the subject if it already exists, reserving deletion for repeated/inaccurate content.
 
::::: Taking the [[Sessions]] page as an example, probably it shouldn't have a link to [[Script:3150]] - [[Script:3150]] should be removed and its contents included as a section of [[Sessions]], along with other plugins relevant to Sessions, such as [[Script:2010]], as in my understanding Session is a more generic Vim concept than a script/plugin which manages it.
 
::::: But again, my knowledge/experience with wikis is very limited. --Marcmontu 16:55, July 24, 2012 (UTC)
 
::::::Deleting stuff is problematic because it upsets people. However, keeping stuff also has downsides. For example, suppose you had never seen this wiki, and encountered the "sessions" page above via a search. A sensible reaction would to leave the wiki (and never visit it again) because you are clearly not going to get anything useful in a place that has content like that. Another downside is that bad content upsets Fritzophrenic and myself because we care about the place and have done a lot of work trying to fix things from all the old tips (which included a lot of garbage because vim.org was not editable) and which were imported from vim.org ''five years ago''. There are still 620 tips that include [[Template:Review]], and we need them fixed (see [[:Category:Review]]; btw Fritzophrenic, I liked what you did [[Make arrow keys work in visual mode under Windows|here]]). Perhaps we should have a triage campaign and just delete stuff that we think is not helpful in its current state, and which is likely to hang around forever. I have several old tips that I'm working on, and they will involve merging (thereby fixing) around ten other tips with partially duplicated material. Also, there is [[Vim Tips Wiki:New tips]] which needs urgent attention. At a wiki people can just work on what they want, but it needs to actually ''help''. [[User:JohnBeckett|JohnBeckett]] ([[User talk:JohnBeckett|talk]]) 04:49, July 25, 2012 (UTC)
 
:::::::Normally I'd say to replace them all with redirects to actual tip pages, and maybe we can do that for some of them (like [[operator]]). However for something like [[Sessions]], if I search for such a general term, I want to get a bunch of results. I ''don't'' want to be forced to a single page. These should be deleted and any useful content (like the single help link) moved to appropriate pages if not present already. &ndash;[[User:Fritzophrenic|Fritzophrenic]] ([[User talk:Fritzophrenic|talk]]) 19:32, July 25, 2012 (UTC)
 
 
I have deleted the pages which currently appear as red links above (after checking again that there was no useful material that could not be found with a quick search). I changed one redirect to a page with some helpful information: [[Mappings]]. I'll think later about the question I have asked in the comments section on that page. If 83.x.x.x sees this, sorry, but I tried leaving a couple of messages to alert you so you could join the discussion, but was not successful. [[User:JohnBeckett|JohnBeckett]] ([[User talk:JohnBeckett|talk]]) 04:24, July 30, 2012 (UTC)
 
----
 
'''More stuff to be deleted'''
 
*[[Android]]
 
*[[Whitespace]]
 
I left a note on these new pages (both created by [[Special:Contributions/79.184.64.232|79.184.64.232]]). [[User:JohnBeckett|JohnBeckett]] ([[User talk:JohnBeckett|talk]]) 08:09, July 31, 2012 (UTC)
 
 
==Script 4118==
 
Yes, you are right, I only wanted to leave a comment for vim-signature. Sorry for the confusion.
 
[[User:Lineinthesand|Lineinthesand]] ([[User talk:Lineinthesand|talk]]) 12:00, December 7, 2012 (UTC)
 
:No problem, and comment is at [[Script:4118]]. [[User:JohnBeckett|JohnBeckett]] ([[User talk:JohnBeckett|talk]]) 02:40, January 4, 2013 (UTC)
 
 
== Some basic usage ==
 
what is <C-O> ? is it zero or alphate o
 
how to copy and paste in insert mode
 
<small>--Preceding [[Vim Tips Wiki:Quick reference|unsigned]] comment added by [[User:Vinayvim|Vinayvim]] 13:28, January 3, 2013</small>
 
----
 
Unfortunately copy/paste is yet another topic that needs a lot of work to be properly cleaned up here. However, there is some information in the following that may assist.
 
*[[VimTip21|21 Easy pasting to Windows applications]]
 
*[[VimTip71|71 Transfer text between two gvim sessions using clipboard]]
 
*[[VimTip356|356 Quick yank and paste]]
 
*[[VimTip386|386 Cut/copy and paste using visual selection]]
 
*[[VimTip984|984 Accessing the system clipboard]]
 
*[[VimTip1511|1511 In line copy and paste to system clipboard]]
 
 
In Vim documentation (and mappings), <code><C-O></code> (which is equivalent to <code><C-o></code>) represents Ctrl-O (the letter, not zero). See:
 
*[[VimTip459|459 Use Ctrl-O instead of Esc in insert mode mappings]]
 
*{{help|i_CTRL-O}}
 
 
If you could copy the text of <code><C-O></code> into Vim, you could put the cursor on the "O" and type <code>ga</code> to see that it is hex 4f (the ASCII code for the letter "O"). [[User:JohnBeckett|JohnBeckett]] ([[User talk:JohnBeckett|talk]]) 02:40, January 4, 2013 (UTC)
 

Latest revision as of 03:04, December 18, 2013

Feel free to ask questions or make suggestions by clicking "leave message" above.
You might like to add ~~~~ to insert your name and the date.

Archives: 1, 2, 3, 4, 5

Around Wikia's network

Random Wiki