Jul 06 23:07:47 * kushal has changed the topic to: Welcome to Linux User's Group of Durgapur | Mailing list at http://lists.dgplug.org/listinfo.cgi/users-dgplug.org | Old classes http://www.dgplug.org/irclogs/ | <--SPECIAL SESSION ON VIM pyNem--> | Jul 06 23:07:50 kushal, ok .. what is the general format? what am I supposed to do? Q/A ? or .. ? Jul 06 23:08:03 pyNem, you can just talk about features Jul 06 23:08:14 pyNem, after a few of them , you can take questions Jul 06 23:08:34 pyNem, students will type ! and wait, you ask them to speak one by one in FIFO Jul 06 23:08:35 :p Jul 06 23:08:38 first up, obviously a rough count of how many people use vim here ? Jul 06 23:08:38 pyNem, thats it Jul 06 23:08:44 Usage: ME , sends the action to the current channel (actions are written in the 3rd person, like /me jumps) Jul 06 23:08:48 * kushal uses vim Jul 06 23:09:25 okay .. Jul 06 23:09:27 :) Jul 06 23:09:52 GUYS Jul 06 23:09:55 are you here Jul 06 23:10:08 * Prakhar uses vim Jul 06 23:10:23 * Soumya uses vim Jul 06 23:10:34 * ria is here Jul 06 23:10:37 * Subhodip uses vim Jul 06 23:10:57 * ria uses vim Jul 06 23:11:08 obv, how many use emacs? Jul 06 23:11:11 * mavu_ uses vim Jul 06 23:11:31 oh before any of that.. I should be introducing myself Jul 06 23:11:54 I am Pranesh Srinivasan, a second year at Comp Sci at IIT Madras. Jul 06 23:13:00 I recently wrote an article for the linuxgazette, after which Kushal spoke to me about speaking at #dgplug . I agreed immidieatly. Jul 06 23:13:15 The article can be found here http://linuxgazette.net/152/srinivasan.html Jul 06 23:13:36 and since this is the first time i am speaking to an audience on irc .. i would prefer that it is more interactive Jul 06 23:14:32 As for myself, I use vim all the time. I do know enough of emacs, to do the basics, but Vim was first love. Vim has always allowed me to do whatever I want to without too much of fuss. Jul 06 23:14:35 * bose_aritra uses vim Jul 06 23:14:39 And yeah, no carpal tunnel syndrome :) Jul 06 23:15:17 OK .. so I guess I can assume that people know how to insert stuff in vim, and move around (with hjkl of course) ... Jul 06 23:16:03 yup :) Jul 06 23:16:04 hm.. the Vim editor basically stands for Vi Improved, and was modelled after Vi, one of the first visual editors ever. Jul 06 23:16:28 It offers a lot of nice features over and above Vi, and can be real fun to use. Jul 06 23:16:43 As I like to say it, vim makes you think about text editing. :) Jul 06 23:16:44 pyNem, read you article.. good one Jul 06 23:16:52 samar, thanks :) Jul 06 23:17:23 the latest version of Vim is Vim 7.x and is probably a supernova release Jul 06 23:17:37 it has several new features like omni-completion, tabs, etc.. Jul 06 23:17:48 so why should you use vim at all? Over something like Gedit? Jul 06 23:17:57 because it is more effective in the long run. Jul 06 23:18:08 * techno_freak uses Emacs Jul 06 23:18:15 Agreed that there is a bit of a learning curve involved, but in the long run it pays off. Jul 06 23:18:44 * pyNem doesnt care about the editor war. Each editor to itself. They have separated hack3rd0m enough. Jul 06 23:18:56 so what can you do in vim? Jul 06 23:19:24 to put it simply, anything you would ever want to do with any IDE Jul 06 23:19:30 * prams has quit ("ChatZilla 0.9.83 [Firefox 3.0b5/2008032600]") Jul 06 23:19:49 * prams (n=chatzill@125.20.11.34) has joined #dgplug Jul 06 23:19:51 You can make vim behave like your favourite IDE Jul 06 23:20:02 or make it complete PHP code for the web developer in you Jul 06 23:20:07 * munichlinux use GNUEmacs Jul 06 23:20:17 prompt you with GObject methods Jul 06 23:20:37 anything you would ever want to do with programming Jul 06 23:20:55 it is important to keep in mind that vim isnt quite like emacs Jul 06 23:21:19 vim kind of integrates with the GNU philosophy of one tool for one action Jul 06 23:22:01 in Bram Moolenaar's (the founder of Vim's) words Jul 06 23:22:32 vim isnt a one stop solution for everything Jul 06 23:22:41 i am not quoting him word for word Jul 06 23:23:29 aha Jul 06 23:23:44 "After all, Vim is an editor, it's not supposed to do non-editing tasks. " :help shell-window Jul 06 23:24:02 yeah so that basically sums up its philosophy Jul 06 23:24:35 but even if you are one of those people who wish to learn an all powerful tool, vim would do fine too, since lots of programs have vim keybindings Jul 06 23:24:40 yeah so that gotten across Jul 06 23:24:49 there is a lot I can talk about vim. Jul 06 23:25:01 it is feature packed, and very powerful Jul 06 23:25:33 when it comes to editing text there is nothing like vim Jul 06 23:25:51 you should see a vim maestro on the keyboard... they plan changes, and keys are struck, and changes reflected Jul 06 23:25:51 :) Jul 06 23:26:00 * sunny_slls (i=Sunny@117.99.50.224) has joined #dgplug Jul 06 23:26:20 a friend of mine from the US told me about his prof's RA who used vim :) Jul 06 23:26:39 ok .. without getting Off Topic, lets get to the vim basics Jul 06 23:27:06 there are three basic modes in Vim (the Vim help says 6, the other 3 are best left out for now) Jul 06 23:27:16 normal mode, which is what you get into when you launch vim, Jul 06 23:27:17 * Debashree has quit (Read error: 104 (Connection reset by peer)) Jul 06 23:27:30 insert mode which is what happens when you hit 'i' in normal mode Jul 06 23:27:43 and visual mode which is what you get into when you hit 'v' in normal mode Jul 06 23:27:57 to get back to normal mode from insert or visual, simply hit Jul 06 23:28:02 or am I being too basic here? Jul 06 23:28:08 hm.. where should I start off? Jul 06 23:28:49 kushal, what should I be doing? Intro to vim? or how to customise vim? or what you can use vim for? Jul 06 23:28:58 pyNem, 2nd level, not beginners, just answer beginner questions if they have Jul 06 23:29:05 :) Jul 06 23:29:10 pyNem, what you can do , customize Jul 06 23:29:38 pyNem, what techno_freak said Jul 06 23:29:55 ok .. any beginner questions ? Jul 06 23:29:56 * Debashree (n=Debashre@61.2.165.173) has joined #dgplug Jul 06 23:29:59 * Soumya has quit ("Leaving") Jul 06 23:30:50 am i late Jul 06 23:31:00 sunny sharma Jul 06 23:31:09 we did the mode switching , going to lines.. find replace etc. copy paste action Jul 06 23:31:20 mavu_, oh .. :) Jul 06 23:31:38 fine do you people know about xp? Jul 06 23:31:54 it was one of my favourite vim tricks in the beginning. Jul 06 23:32:03 ya Jul 06 23:32:06 pyNem, switching between chars Jul 06 23:32:09 yup Jul 06 23:32:11 swapping chars.. Jul 06 23:32:12 :) Jul 06 23:32:23 ! Jul 06 23:32:26 useful for hte and the likes Jul 06 23:32:30 yeah sunny_slls Jul 06 23:32:56 what's swapping chars... Jul 06 23:33:15 sunny_slls, please read all old classes first Jul 06 23:33:27 ok so i presume you know ddp as well Jul 06 23:33:34 which translates to swapping lines Jul 06 23:33:50 sunny_slls, it isnt all that difficult.. :) Jul 06 23:34:05 fine do you know about text objects then? Jul 06 23:34:17 these are awesome if you can use them well .. Jul 06 23:34:24 pyNem, thanks i wanted to hear this Jul 06 23:34:36 i presume you wouldnt Jul 06 23:34:46 so ill explain what text objects are Jul 06 23:34:50 sunny_slls, no probs :) Jul 06 23:34:57 and see how things go Jul 06 23:35:17 ok Jul 06 23:35:19 human language is divided into various parts that computers wont understand naturally Jul 06 23:35:33 like for eg.. predicates, and clauses, and articles .. Jul 06 23:35:43 vim doesnt let you deal with them of course Jul 06 23:35:55 it lets you deal with words and sentences, and paragraphs Jul 06 23:36:36 you can navigate with words, or delete sentences or replace paragraphs, or skip blocks of code (it changes the meaning of some of these things, like blocks of code, with respect to the language you are editing). Jul 06 23:37:13 hm.. well start off with deleting a word Jul 06 23:37:35 oh btw, i think vim has natural lang support for bengali, so you should be able to do this in bengali as well ? Jul 06 23:38:07 fire vim up and type in a sentence or a paragraph. Say we type in Jul 06 23:38:27 We are the Linux Users' Group of Durgapur. The group officially started on Sep 8, 2004. A few small brains grouped together to populate Linux in the locality. Jul 06 23:38:28 The core team for the group is like: Jul 06 23:38:28 Coordinator: Kushal Das, Soumya Kanti Chakraborty, Ajitesh Chaudhury, Subhodip Biswas Jul 06 23:38:41 which is lifted form the about page of the dgplug Jul 06 23:39:09 you could simply put your cursor on the W of the first word, and hit "w" Jul 06 23:39:18 without the quotes of course Jul 06 23:39:27 it would take you to the next word of course Jul 06 23:39:47 pyNem, i have a question Jul 06 23:40:05 to go a sentence ahead you would do ")" (without the quotes) Jul 06 23:40:06 yeah samar Jul 06 23:40:12 pyNem, i didn't understand the diff between zc and zo Jul 06 23:40:28 in folds ? Jul 06 23:40:34 pyNem, yeah Jul 06 23:40:50 oh .. if you people have progressed till there, then I guess I am a little behind Jul 06 23:40:51 pyNem, zo is to open fold Jul 06 23:41:03 and zc is to close one Jul 06 23:41:04 pyNem, wait ... Jul 06 23:41:05 ! Jul 06 23:41:12 pyNem, not all of them Jul 06 23:41:14 yeah sunny_slls Jul 06 23:41:21 pyNem, i am just asking for curiocity Jul 06 23:41:33 oh Jul 06 23:41:44 ok .. fine .. you can ask these other questions in a while Jul 06 23:41:52 when we get to the Q & A session Jul 06 23:41:56 pyNem, ok i got your answer Jul 06 23:42:03 can you go in the same fashion Jul 06 23:42:04 pyNem, thanx Jul 06 23:42:11 if there is anything related to what I am saying, please feel free to ask Jul 06 23:42:25 sunny_slls, if it is unrelated please wait till a while later Jul 06 23:42:33 sunny_slls, otherwise go ahead Jul 06 23:42:57 should I contine then? Jul 06 23:43:10 please continue Jul 06 23:43:16 i request you to not to jump Jul 06 23:43:32 sunny_slls, oh ok .. sure Jul 06 23:43:40 fine .. so we start again with the paragraph Jul 06 23:43:51 yes Jul 06 23:44:04 put your cursor on 'W' (the first letter) in the normal mode .. Jul 06 23:44:23 and hitting a #w# would take us one word ahead Jul 06 23:44:39 * pyNem says that from now on all commands will be prefixed and suffixed with a # Jul 06 23:44:46 you are not to type in the hash of course Jul 06 23:45:13 * prams has quit ("ChatZilla 0.9.83 [Firefox 3.0b5/2008032600]") Jul 06 23:45:15 so #w# takes you to the beginning of the next word Jul 06 23:45:33 * susenj has quit (Connection timed out) Jul 06 23:45:37 you sould now be at the 'a' Jul 06 23:45:40 of are Jul 06 23:45:51 hitting 'b' would take you one word backward Jul 06 23:46:12 and put your cursor at the beginning of the prev word Jul 06 23:46:23 sorry hitting #b# Jul 06 23:46:34 hitting #e# would take you to the end of the next word ... Jul 06 23:47:17 there is no simple equivalent for the end of the previous word Jul 06 23:47:32 2be Jul 06 23:47:34 ? Jul 06 23:47:52 you would have to hit a two character keystroke #ge# Jul 06 23:47:58 ok Jul 06 23:48:07 kushal, yeah but there is a simpler one .. #ge# .. not one char though :( Jul 06 23:48:35 but it is fine because you will realise that going to the end of the prev word is something you rarely do Jul 06 23:48:39 anyway .. Jul 06 23:48:50 hitting #(# would take you one sentence backward Jul 06 23:48:56 and #)# one sentence forward Jul 06 23:49:16 Sentences are of course delimited by full stop '.' Jul 06 23:50:15 #{# and #}# take you paragraphs backward and ahead respectively Jul 06 23:50:20 all of you got that? Jul 06 23:50:38 * techno_freak has quit ("Leaving") Jul 06 23:51:01 yes Jul 06 23:51:06 so we know how to describe text objects .. Jul 06 23:51:20 (well come to blocks of code later) Jul 06 23:51:21 why do we bother about them? Jul 06 23:51:38 becuase it will make deleting and editing stuff a lot easier Jul 06 23:52:00 you can team these motions up with the delete commnad you learnt before Jul 06 23:52:20 put your cursor on the L of "Linux" on the first line of the paragraph Jul 06 23:52:28 htiting dw would delete the word Jul 06 23:52:55 it basically means delete from here till end of word Jul 06 23:53:04 hit u to undo Jul 06 23:53:13 and move your cursor forward to the n of Linux Jul 06 23:53:23 hitting dn would now remove nux Jul 06 23:53:26 #dn#* Jul 06 23:53:46 "nux " (inc the space after the x) Jul 06 23:54:41 as you guessed #d)# would delete from here till end of sentence Jul 06 23:55:30 vim also lets us use the more natural #ds# delete from here till end of sentence for this. (you cannot however use s to move around. Only in deleting and change motions) Jul 06 23:55:45 similary d( would delete from here till start of sentence Jul 06 23:56:41 similarly #d{# would delte from here till start of paragraph Jul 06 23:56:53 and #d}# till the end of the pragraph. Jul 06 23:57:08 what if you wanted to delete an entire sentence. (and not a line) Jul 06 23:57:29 would you do #(d)# (which means #(# goto start of sentence Jul 06 23:57:47 and #d)# or #ds# to delete from here till end of sentence ? Jul 06 23:57:51 no there is an eaiser way Jul 06 23:58:02 #das# Delete A Sentence Jul 06 23:58:11 you can do this with your cursor anywhere in the sentence Jul 06 23:58:27 * susenj (n=student@59.178.187.255) has joined #dgplug Jul 06 23:58:56 similarly daw would delete the word you are on Jul 06 23:59:28 and #dap# would Delete A Paragraph Jul 06 23:59:35 have you people followed so far? Jul 07 00:00:07 yes Jul 07 00:00:11 yes Jul 07 00:00:13 yes Jul 07 00:00:24 yes Jul 07 00:00:35 :) Jul 07 00:00:46 did you know all this before? Jul 07 00:00:50 no Jul 07 00:00:53 (just to ensure that I am not repeating) Jul 07 00:00:55 fine :) Jul 07 00:00:59 continuing on... Jul 07 00:01:00 ! Jul 07 00:01:08 yeah sunny_slls Jul 07 00:01:31 can you show this with an example Jul 07 00:01:44 deleting a para Jul 07 00:01:48 sure Jul 07 00:02:01 i hope you have copy pasted that paragraph into vim Jul 07 00:02:11 the "About us" para from the dgplug Jul 07 00:02:30 actaully thats a bad example, since there is only one para Jul 07 00:02:31 hold on Jul 07 00:02:44 no sorry i am working on windows Jul 07 00:03:27 no probs Jul 07 00:03:33 <<< lots of text to follow >>>> Jul 07 00:03:43 lifted from today's wikipedia feature article Jul 07 00:03:45 The Russian–Circassian War (1763 – 1864) was the period of hostilities between the Russian Empire and the inhabitants of Circassia during the Russian invasion and occupation of the Circassian region. Circassia (also known as Cherkessia in Russian) was a region in Caucasia which consisted of the coastline and most of the interior of the current territory of Krasnodar Krai and Adygea.[5] The historical region, now mainly North Ossetia–Alania, was name Jul 07 00:03:45 d after the traditional inhabitants, the Circassians, Adyghe or Adiga, along with a number of smaller ethnic groups and tribes.[6] The Russian–Circassian conflict began with the initial arrival of Russian occupation forces in 1763, and ended with the signing of several Russian loyalty oaths by Circassian leaders on June 2, 1864 (May 21, O.S.). Jul 07 00:03:45 While the Russian–Circassian War began as an isolated conflict, Russian expansion through the entire region soon brought it into conflict with a number of other nations in what later became known as the Caucasian War, and of which the Russian–Circassian War became a part. Both came to an end with the signing of the loyalty oaths to Russia, and with the total occupation of the region by Russian forces, which involved the mass migration[1][7][5] of mill Jul 07 00:03:50 ions of indigenous Circassians to areas of the Ottoman Empire (modern Turkey, Syria, Lebanon, Israel, Jordan and Kosovo),[5] with some Circassian historians citing that up to 4,000,000 civilians perished during the exodus.[8] Jul 07 00:03:53 ill put it on pastebin Jul 07 00:04:01 pyNem, you can use http://rafb.net/paste :p Jul 07 00:04:26 yeah, but i wasnt sure if i needed it :) Jul 07 00:06:02 http://rafb.net/p/iaL2hI31.html Jul 07 00:06:11 did Jul 07 00:06:14 we shall from now on work on that piece of text Jul 07 00:06:54 you can now put your cursor anywhere in the first paragraph, and try a #dap# Jul 07 00:07:07 ok .. with that done Jul 07 00:07:28 the next thing you should realise is the preciousness of keystrokes Jul 07 00:07:39 editing in vim is like a game.. every keystroke matters ;) Jul 07 00:07:52 so what if you wanted to delete the word, but leave the spaces around it? Jul 07 00:08:07 you would do #diw# which means Delete Inside of Word Jul 07 00:08:50 you can try it with your cursor somewhere on the word "period" on the first line of the new sample text Jul 07 00:08:54 * Soumya (n=Soumya@117.192.0.231) has joined #dgplug Jul 07 00:09:40 similarly you can do #dis# for Delete Inside of Sentece Jul 07 00:09:48 which would leave the space after '.' Jul 07 00:10:15 #dip# would mean Delete Inside of Paragraph, and would leave the newline after the first paragraph Jul 07 00:10:28 you can try this out with your cursor on the first paragraph .. Jul 07 00:10:53 try #dap# to see the effect. Hit #u# for undo, and hit #dip# for Delete Inside of Paragprah and see the changes Jul 07 00:11:36 done? Jul 07 00:11:49 so think before hit delete basically Jul 07 00:12:03 think what you want left .. how much of it do you want left .. Jul 07 00:12:17 the initial thinking will pay off when you get used to it :) Jul 07 00:13:17 now why would you want to do this? Jul 07 00:13:24 because you obviouly want to either Jul 07 00:13:27 a) delete the sentence Jul 07 00:13:33 b) replace the sentence Jul 07 00:13:41 ! Jul 07 00:13:47 for case b) instead of #disi# there is something easier :) Jul 07 00:13:50 yeah sunny_slls Jul 07 00:15:06 how do we do it in windows Jul 07 00:15:16 as in ? Jul 07 00:15:21 arent you using vim on windows? Jul 07 00:15:42 nop Jul 07 00:16:03 oh then none of this would have worked Jul 07 00:16:08 these are all features of vim.. Jul 07 00:16:12 you can download vim for windows Jul 07 00:16:31 ftp://ftp.vim.org/pub/vim/pc/gvim71.exe Jul 07 00:16:38 would get you the latest Jul 07 00:16:46 ok .. are the others following? Jul 07 00:16:50 yes Jul 07 00:17:32 fine before we proceed ahead Jul 07 00:17:38 let me just explain something Jul 07 00:18:03 see the word in the first paragraph ? "Russian–Circassian" Jul 07 00:18:07 how would you delete it? Jul 07 00:18:15 daw wont work, since it would stop at '-' Jul 07 00:19:04 that is why vim provides another text object W, which is for words with hypens, semi-colons, parantheses .. etc.. Jul 07 00:19:08 only the space will stop it Jul 07 00:19:22 therefore you just have to hit #daW# delete a Word Jul 07 00:20:24 * indradg_ has quit (Remote closed the connection) Jul 07 00:20:50 got that? Jul 07 00:20:55 yes Jul 07 00:21:03 get used to this small difference .. it can pay a lot when editing code :) Jul 07 00:21:14 of course there are other motions as well Jul 07 00:21:25 for example say your cursor is on the first line Jul 07 00:21:35 at the u of Russian Jul 07 00:21:57 and you wanted to get to the 'o' of period Jul 07 00:22:07 (it is the first 'o' from your current cursor position) Jul 07 00:22:19 you can hit #fo# which means move forward till o Jul 07 00:23:13 this is the most useful feature in vim Jul 07 00:23:16 get used to ti Jul 07 00:23:23 xp Jul 07 00:23:26 obviously this can be combined with the delete command Jul 07 00:23:28 xp ? Jul 07 00:23:32 it Jul 07 00:23:37 lol Jul 07 00:23:45 :) Jul 07 00:24:02 pyNem, your students are using Vim on you Jul 07 00:24:02 :) Jul 07 00:24:07 yeah i got it :) Jul 07 00:24:17 * pyNem says thats the way to go! :) Jul 07 00:24:27 when i first learnt vim, my text would often be like Jul 07 00:24:44 yeah, so like you know4xcan seehj :) Jul 07 00:25:14 yeah so if you wanted to delete from the u of Russian to the 'o' of period, it would be Jul 07 00:25:18 #dfo# Jul 07 00:25:19 :) Jul 07 00:25:47 what about from the 'u' of Russian to the 'h' of hostilities Jul 07 00:26:05 dbo? Jul 07 00:26:06 noting that it is the second 'h' it would be Jul 07 00:26:20 oops Jul 07 00:26:26 mavu_, no probs :) Jul 07 00:26:32 #d2fo# Jul 07 00:26:42 so you begin to see that you can combine motions with deletion Jul 07 00:26:57 ! Jul 07 00:27:53 yeah sunny_slls Jul 07 00:28:31 once more please #d2fo# Jul 07 00:29:18 explain Jul 07 00:30:39 sorry was away for a while Jul 07 00:30:45 yeah so what #d2fo# does is Jul 07 00:31:04 it deletes from current cursor position to the second 'o' from here (2fo) Jul 07 00:31:15 including the second 'o' Jul 07 00:32:04 * Soumya has quit ("Leaving") Jul 07 00:32:13 ok so as we were saying when you have to replace a sentence vim provides a very nice way of doing things Jul 07 00:33:11 so how it is deleting u of russian to h of hostellites Jul 07 00:33:47 see the #fo# takes you to the first 'o' after 'u' (which is 'o' of period) Jul 07 00:34:11 another #fo# would take you to the first 'o' after 'o' of period which is 'o' of hostilities Jul 07 00:34:25 you can combine these with #2fo# Jul 07 00:34:42 and #d2fo# means Delete till 2nd 'o' Jul 07 00:35:32 so as i was saying Jul 07 00:35:36 changing in vim Jul 07 00:36:01 say you want to change this sentence, and your cursor is somehwere on it.. with your new found knowledge, it would be #disi# Jul 07 00:36:07 there is a better way of doing things .. Jul 07 00:36:18 #cis# Change Inside of Sentence , Jul 07 00:36:28 or #cas# change a sentence Jul 07 00:36:42 note that this puts you in insert mode after deletion Jul 07 00:36:46 * Soumya (n=Soumya@117.192.0.231) has joined #dgplug Jul 07 00:36:47 so you save the keystroke Jul 07 00:36:56 * Debashree has quit (Read error: 104 (Connection reset by peer)) Jul 07 00:37:24 you can do this for words, and paragraphs, and Words .. Jul 07 00:37:38 #caw# #cap# #ciW# whatever you want :) Jul 07 00:37:55 a typical situation that arises is something like this Jul 07 00:38:15 a = fooFight(foo, bar); Jul 07 00:38:20 a typical line in a C program Jul 07 00:38:35 * Debashree (n=Debashre@61.2.165.218) has joined #dgplug Jul 07 00:38:43 you are on the 'g' of fooFight, and you suddenly realise that the parameters are wrong... Jul 07 00:39:31 so you can hit #ff# which will take you to the opening 'f' of the argument foo Jul 07 00:40:08 and the hit, #cfr# which means change from here to next r Jul 07 00:40:35 but looking at the prev char of whatever you are going to say is cumbersome, we wanted to delete till '(' .. Jul 07 00:40:49 ')'* Jul 07 00:40:52 why should we delete till the 'r' before ')' Jul 07 00:41:05 why cant vim allow me to directly delete till (Excluding) ')' Jul 07 00:41:06 it does Jul 07 00:41:12 using the delete till command Jul 07 00:41:30 basically like #fx# takes you to the next instance of char x Jul 07 00:41:41 #tx# takes you till x, putting you just before the next 'x' Jul 07 00:42:49 therefore as you may guess #dtx# puts delets till x (excluding x) Jul 07 00:43:01 so we could have done #ff# followed by #dtx# Jul 07 00:43:06 #dt)# * Jul 07 00:43:16 which would have translated to #ffdt)# Jul 07 00:43:27 if we wanted to change we would have done #ffct)# Jul 07 00:43:29 go that? Jul 07 00:43:32 take your time with this :) Jul 07 00:44:37 ! Jul 07 00:44:55 * samar has quit ("Ex-Chat") Jul 07 00:45:14 yeah tell me mavu_ Jul 07 00:45:19 is there a way to remember all these? (/me is losing track :( ) Jul 07 00:45:42 yeah Jul 07 00:45:46 see Jul 07 00:45:48 ill repeat again Jul 07 00:45:54 and then give you a nice thing to keep with you Jul 07 00:45:59 fx is to go forward till x Jul 07 00:46:22 w is go ahead a word (similarly for e, b, and ge) Jul 07 00:46:44 tx is to go till x (to stop short of x) Jul 07 00:47:05 and you can combine these things with 'd' and 'c' which mean delete and chnage Jul 07 00:47:11 use the english mnemonics Jul 07 00:47:21 hm.. because I had trouble rememembering Jul 07 00:47:45 i wrote notes, which i transformed to the vim tut, i wrote Jul 07 00:47:46 http://linuxgazette.net/152/srinivasan.html Jul 07 00:48:06 you can find all this on the slightly advanced navigation on a line Jul 07 00:48:21 slightly advanced navigation > simple navigation on a line Jul 07 00:48:22 of course Jul 07 00:48:31 there is also one other excellent thing to keep in mind Jul 07 00:48:38 in handy* Jul 07 00:49:18 http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html Jul 07 00:49:24 download a copy and keep it with you :) Jul 07 00:49:51 :) Jul 07 00:50:01 ok, i think i have done enough, to gulp down for a night Jul 07 00:50:05 any questions Jul 07 00:50:06 whatsoever Jul 07 00:50:10 related to anything Jul 07 00:50:19 plugins, customisation, colorschemes, anything :) Jul 07 00:50:26 or related to whatever i said.. :) Jul 07 00:50:32 feel free to ask Jul 07 00:51:32 i use the desert color scheme (on gvim) and evening on normal vim .. you can change your colorscheme to evening using Jul 07 00:51:33 :colorscheme evening Jul 07 00:51:36 and similar commands Jul 07 00:52:04 you can find my .vimrc here Jul 07 00:52:21 http://linuxgazette.net/152/misc/srinivasan/vimrc.txt Jul 07 00:53:40 * _pjp_ (n=pjp@59.92.195.167) has joined #dgplug Jul 07 00:53:54 _pjp_, hi Jul 07 00:54:29 pyNem, thank you Jul 07 00:54:44 pyNem, you can call it off for tonight Jul 07 00:54:56 thanks kushal Jul 07 00:55:06 it was great fun everybody :) Jul 07 00:55:08 :) thanks a lot Jul 07 00:55:17 <--SESSION CLOSED-->