13:07:21 #startmeeting Fedora classroom 13:07:21 Meeting started Fri Aug 18 13:07:21 2017 UTC. The chair is x3mboy. Information about MeetBot at http://wiki.debian.org/MeetBot. 13:07:21 Useful Commands: #action #agreed #halp #info #idea #link #topic. 13:07:21 The meeting name has been set to 'fedora_classroom' 13:07:37 #meetingname "Fedora classroom - VIM 101" 13:07:37 The meeting name has been set to '"fedora_classroom_-_vim_101"' 13:07:50 #topic Hello! 13:08:18 Hi 13:08:38 Hi 13:08:45 .hellomynameis pany 13:08:46 pany: pany 'Pany' 13:09:35 Hello everyone, my name is Eduard Lucena. I'm a contributor in the Fedora Project, working with Marketing, the Fedora Magazine, Ambassadors and other little things. 13:09:41 .hello2 13:09:42 nb: nb 'Nick Bebout' 13:09:45 Hello 13:10:00 hi 13:10:07 We are here to have a little introduction to vim, IMHO the most powerfull cli editor ever 13:10:09 :D 13:10:21 Really? 13:10:32 #chair nb 13:10:32 Current chairs: nb x3mboy 13:10:38 the most powerful editor? 13:10:57 For me, yes. And we will see why 13:11:06 Interesting 13:11:32 I always find it a bit hard to use, accessible though 13:11:57 mehdi, Well, we are here to learn how to 13:12:14 Yes, we are 13:12:53 linuxEnthusiast aditya_r pany foxmean vanheckcz mehdi nb welcome to this class 13:13:05 I will give 2 more minutes to more people to join 13:13:26 Thanks Eduard 13:13:30 In the meanwhile, please can somebody tell me, what version of vim do you have installed in your system? 13:13:49 Nice to meet you guys :D 13:13:54 8.0.885 13:14:06 8.0 for me 13:14:22 Mine is Vi. Are they the same? 13:14:32 mehdi, vi is not the same as vim but similar 13:14:34 version 8.0.946 13:14:38 vim is a more enhanced version of vi 13:14:40 8.0.855 13:14:54 sorry 8.0.885 13:15:00 8.0.606 13:15:09 OK, let me install vim 13:15:23 Nice to meet you, I'm the first experience to join tutorial in IRC. Today, I'm plan to observe because of I'm in Job Time. My vim version is 8.0 in Debian 9.1 13:15:31 can i follow on vi? 13:15:44 vim 8.0.586 13:16:21 But, when I run `vi --help` it displays `VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Aug 7 2017 13:21:18)` 13:16:45 nmnbd[m], probably don't and I'm going to tell you why 13:16:45 So, I guess I have VIM 8.0 installed 13:17:18 mehdi, maybe try $ which vim? 13:17:20 8.0.855 13:17:43 I guess you have Vim mehdi 13:18:06 foxmean, so which one should I have? 13:18:36 mehdi, try run $ vim --version 13:18:51 Hi 13:18:52 When I run `vim` it tells me I need to install it. But, when I enter `vi --help` it shows Vi Improved` 13:19:14 mine 8.0 13:19:14 same goes for me 13:19:31 Install package 'vim-enhanced' to provide command 'vim'? [N/y] y * Waiting in queue... * Loading list of packages.... The following packages have to be installed: vim-common-2:8.0.885-1.fc26.x86_64 The common files needed by any version of the VIM editor vim-enhanced-2:8.0.885-1.fc26.x86_64 A version of the VIM editor which includes recent enhancements vim-filesystem-2:8.0.885-1.fc26.x86_64 VIM filesystem layout 13:19:49 And that's what happens 13:19:55 Let me explain this quickly 13:20:04 OK, thanks 13:20:07 Fedora comes with vim-minimal 13:20:21 That's more similar with the old vi 13:20:46 vim it's just: VI iMproved 13:20:55 A better and extended version 13:21:03 Yes 13:21:11 So, in order to have vim, instead of vi, you need to install vim-enhanced 13:21:46 So 13:21:55 So, what is vim-common? 13:22:52 libraries for vim 13:23:12 vim-common is just the common files that are shared by all vim versions: vim-X11, vim-gtk and vim-enhanced 13:23:16 bt0, +1 13:23:29 Are the libraries that extend vi into vim 13:24:18 And the installation is a little weird, it does not show packages size, as compared to other packages I normally install via `dnf install` 13:25:51 That's other issue. As you installed saying yes to that question, you use PackageKit to install it, no dnf 13:25:53 And that's because I did not install vim via `dnf install`, rather by responding 'yes' to Fedora's suggestion when I tried to run the missing `vim` 13:26:11 Yes x3mboy exactly 13:26:35 But, continuing with the class 13:26:54 OK, now I have vim 8.0.885 installed 13:26:55 #topic Quick review of the history of vim 13:29:05 Vi was written for Unix, as an alternative of the line editors 13:29:16 Someone knows what a line editor is? 13:29:23 ed 13:29:39 borg0, +1 13:29:52 ed and sed are the most common 13:30:30 line editors doesn't allow you to see the whole file while editing, they work by buffering each line and performing the commanded changes 13:30:31 What does it do? 13:30:36 It must be a boring editor 13:30:37 lol 13:30:51 That means that you can't read the file in the screen 13:31:10 Oh that's terrible 13:31:14 That why the idea of screen edirots comes out 13:31:32 The most populars were/are emacs and vi 13:31:47 vi, stands for VIsual editor 13:32:29 And its main characteristic is that you can see the file and explore it by lines, by character, by page 13:32:34 Or in any way you need 13:32:41 #chair bt0 13:32:41 Current chairs: bt0 nb x3mboy 13:32:54 bt0, sorry, just in case I need help ;) 13:32:58 ok 13:33:30 This is good 13:33:49 .hello skamath 13:33:52 skamath: skamath 'Sachin S Kamath ' 13:34:30 Then, when linux and the Free Software movement comes out, we found a hero called???? 13:34:55 tux 13:34:58 LOL 13:35:18 tux yes :P 13:35:23 Richard 13:35:24 Stallman 13:35:26 Bram Moolenaar, comes in 1991 with his improved version of vi, and he called vim 13:35:51 Oh, I was mistaken :( 13:36:00 Just because vii sounds aweful 13:36:11 (vee-eye-eye) 13:36:21 So, now we have this little editor here 13:36:29 Let's explore it 13:36:38 #topic Starting vim 13:36:43 #chair skamath 13:36:43 Current chairs: bt0 nb skamath x3mboy 13:36:43 (na-nn-oo) sounds worse 13:37:20 Sorry to be off-topic, can someone tell me what a chair is? 13:37:39 mehdi, people who can control meetings. 13:38:08 Via IRC commands? 13:38:08 chairs can do things like add more chairs, change topic, close meeting, etc 13:38:21 bt0, nb and skamath are colaborators, that can manage the control of the meeting 13:38:32 mehdi, no via zodbot commands. 13:38:39 mehdi, exactly, via IRC commands, sent to the zodbot, the meet bot 13:38:44 Ok, on-topic again 13:38:51 OK, thanks 13:38:59 Please, if you can, download this file: https://github.com/X3MBoy/toolbox/blob/master/README.md 13:39:17 i think I need a zodbot class session! 13:39:25 mehdi, https://wiki.debian.org/MeetBot 13:39:26 And please, of you are a developer, don't judge my github, I'm a sysadmin, not a developer 13:39:33 geek_cl, hello! 13:39:42 hello x3mboy 13:40:11 Do you download the file? 13:40:16 geek_cl, https://github.com/X3MBoy/toolbox/blob/master/README.md 13:40:17 +1 13:40:21 +1 13:40:21 Just a text file 13:40:33 x3mboy: so your toolbox is a collection of vim related software? 13:41:10 No, a collection of scripts that I use regularly 13:41:20 Just I have my vimrc file there 13:41:39 x3mboy, should I clone the entire repo? 13:41:39 But vimrc is advanced, we probably will see that in vim 102 session 13:41:50 ok 13:41:58 +1 13:42:01 skamath, If you want. You can just download the md file for the session 13:42:10 Ack. 13:42:16 Ok, continuing 13:42:31 Please invoke the command "vim README.md" 13:43:07 +1 13:43:13 +1 13:43:17 +1 13:43:30 +1 13:43:31 +1 13:43:32 Ok, one the most common things that people face when using vim is how to exit vim 13:43:43 +1 13:43:45 Can you name at least 3 ways to exit vim? 13:43:48 +1 13:43:54 timeout 13:43:55 :q 13:43:56 save, exit - wq 13:44:03 :wq :q :q! :x 13:44:06 esc + :x 13:44:09 #link https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/ 13:44:13 Bonus read 13:44:15 ZZ 13:44:19 skamath, +1 13:44:27 ramzay, that's it!!! 13:44:33 closing the terminal :p 13:44:54 nmnbd[m], that's other common one (even if you can't beleive it) 13:45:00 Ok, let's see 13:45:07 We have to different ways here 13:45:29 One is sendind a : and the other one is calling directly a command 13:46:26 If you enter the file without pressing any other keys, you enter into a Command mode 13:46:35 So any key pressed is just a command 13:46:52 Please if you have the file close, open it again 13:47:03 And see in the interface of vim 13:47:48 !+1 13:47:55 Sorry, I missed a bit of the class. Which file do you mean? 13:47:57 You can see in the bottom of the interface a line that says "1,1 All" at the end 13:48:04 mehdi, https://raw.githubusercontent.com/X3MBoy/toolbox/master/README.md 13:48:51 And nothng else 13:48:57 OK, I opened the link using vim 13:49:13 I see " 1,0-1 " at right bottom 13:49:18 mehdi, opened link using vim? 13:49:30 mehdi, No, please, download the file and then open it with vim README.md 13:49:42 OK 13:49:45 wget https://raw.githubusercontent.com/X3MBoy/toolbox/master/README.md; vim README.md 13:49:47 try wget https://raw.githubusercontent.com/X3MBoy/toolbox/master/README.md 13:50:12 dominicpg, Ok, do you open the file README.md? 13:50:15 I read everyone's mind :P 13:50:19 Or you just execute vim 13:50:29 skamath, mindmaster 13:50:29 I opened file x3mboy 13:50:52 dominicpg, ok, but do you actually see the file? 13:51:09 NOw I have downloaded README.md 13:51:14 I'm going to explain a little bit what you are seeing 13:51:17 I have it open in vim 13:51:36 1,1 means line 1 column 1 13:51:36 yes I see the file content x3mboy 13:51:38 ok 13:52:01 When you see 0-1 in the column part, means you are in an empty line 13:52:28 Yes I see 0-1 13:52:33 That's why I found weird to see 1,0-1 because the first line of the README.md file is not empty 13:52:46 ah ok 13:53:07 But ok, continuing 13:53:12 #topic Basic movements 13:53:20 make sense. I could move the cursor to a valid line and it displayed values as explained . 13:53:27 ack 13:53:27 In vim we can move with the arrows keys 13:53:48 x3mboy: can 0-1 be just 0? 13:54:02 I mean what does each part of 0-1 tell us? 13:54:17 .:x3mboy:. 1,1 means line 1 column 1 13:54:24 > When you see 0-1 in the column part, means you are in an empty line 13:54:26 the 0 means that is not character in that position 13:54:27 mehdi, ^ 13:54:57 But it says 0-1 becuase the empty line is there, so there is a carriage return 13:55:10 Do you know what a carriage return means? 13:55:37 Yes, a new line? 13:55:44 mehdi, exactly 13:56:26 A new line is not a character, but it needs to be represented, so, 0-1 means that there is a character, but is not visible, just a new line indicator 13:56:35 Also, the All, sorry I skip that. "All" means that you are seeing the complete file in one screen 13:57:06 If you open a larger file, you will see a percentage, indicating what percentage of the file you are seeing 13:57:34 3% 13:58:01 pany, you're seing 3 %??? 13:58:13 x3mboy: Sorry but I do not see 'All' 13:58:40 mehdi, what do you see after 1,1 or line, column indicator??? 13:58:47 Yeah 13:59:18 I see Top 13:59:23 pany, that means that you are in the 3% of the file. It's just vim making math about how many lines are and where are you seeing 13:59:25 'Top' 13:59:44 Top means that you are in the top of the file, but it's not calculated the percentage yet 13:59:53 So, it basically the header of the file 14:00:08 OK 14:00:09 Also, you can see 'Bot' 14:00:17 x3mboy: Sometimes I see percentage and sometimes I see Bot 14:00:20 Meaning that you are at the end of the file 14:00:30 mehdi, I read your mind 14:00:37 lol 14:00:50 Oh sorry, I installed powerline for vim 14:00:52 Maybe too many time working with skamath :P 14:01:06 pany, that's ok. We are covering the basic 14:01:10 pany, no problem 14:01:14 SO lets start moving 14:01:21 :D 14:01:26 Will a record be made from this class? I have to go 14:01:38 vanheckcz, yes, zodbot is recording 14:01:57 And the log will be share in the wiki page, https://fedoraproject.org/wiki/Classroom 14:02:19 thx 14:02:25 vanheckcz, stay tuned with the magazine we will publish the next session and the logs and files used in passed sessions 14:02:58 Ok, as you can see, you can use the arrows, and PgUp and PgDn keys to read the file 14:03:16 But that wasn't always the way to move 14:04:02 How can you move through the file without the arrow keys??? 14:04:09 x3mboy: I know there are shortcuts to move 14:04:14 with W, E 14:04:17 j k h l 14:04:17 hjkl 14:04:23 +1 14:04:24 Sorry 14:04:32 You're on fire! 14:04:48 Ok, just hjkl 14:04:58 hjkl 14:05:12 There are no special meaning on those keys AFAIK, but w and e have a meaining 14:05:21 What do they mean? 14:05:38 w: save ? 14:05:49 I do not know 14:05:57 x3mboy, hahah 14:06:05 Nope, in command mode 14:06:10 W means word 14:06:10 dominicpg: I think that's `:w' 14:06:25 yeah, I meant :w 14:06:31 ack 14:06:33 x3mboy: What is it good for? 14:06:37 If you use just the W ( without the : ) you will move a complete word 14:06:38 jump by Words 14:06:49 how i can enter insert mode 14:06:50 E means end of word 14:06:56 so i can navigate with hjkl 14:07:04 nmnbd[m], just a little bit 14:07:10 ;) 14:07:24 Just the other shortcut is b 14:07:30 hjkl is a replacement for arrow keys. 14:07:46 B is to go backwards word by word 14:07:48 b is for backward by word. 14:08:00 geek_cl, exactly 14:08:03 +1 14:08:12 So, now we are going to write :D 14:08:30 There are 3 types of "Insert modes" 14:08:37 Insert, replace and add 14:09:02 i, s and a 14:09:14 Oh I thought i and s are the same 14:09:52 i is insert from the current place, s is replace the current character and start from the current place, and a is add after the current place 14:09:59 Just easy like that 14:10:09 In Insert mode, the commands are not available 14:10:23 To go back into command mode we need to press the ESC key 14:10:27 x3mboy, o for newline :D 14:10:38 skamath, +1 14:10:48 o insert in a newline 14:10:48 o is for insert text into a new line 14:11:06 (Sorry, i always forgot that one) 14:11:24 Anyone knows why there are so many keyboard shorcuts in vim? 14:11:45 Coz vim is awesome? 14:11:50 skamath, LOL 14:12:00 to keep admins busy 14:12:02 slow terminal 14:12:12 there was no mouse that time? 14:12:16 O is for insert a new line above present position 14:12:22 pany, +1 14:12:25 dominicpg, +1 14:12:32 to emulate old terminals, and keep the compatibility 14:12:46 geek_cl, +1 14:12:51 :) 14:12:52 You are all good 14:13:00 Because it is convenient for keyboardists 14:13:02 :( 14:13:21 vim was created as a clone of vi, and vi was intended to use in all computers, that doesn't have graphical interfaces 14:13:27 So, we only have keyboards 14:13:42 And really old computers doesn't have arrow keys 14:14:04 Wow 14:14:16 Remember that the first keyboards were emulating typewritters keyboards 14:14:31 typewritters? Is that word right? 14:14:49 yeah 14:14:52 I think it's typewriter 14:15:10 There weren't arrow keys there, so first keyboards doesn't have those ine 14:15:14 ones* 14:15:33 Yes 14:15:42 dominicpg found another shortcut, O (capital o) insert text in the line above the current position 14:16:37 :) 14:16:59 x3mboy: intersting how O and o do inserts 14:17:00 Please, make a new line at the end of the file, and write: Fedora Classroom vim 101 14:17:31 Of you feel we are going too slow, please say it 14:17:55 No, I think we're fine 14:18:07 for me is fine 14:18:20 Now, after inserting this new line at the end just put your cursor at the end of the line (in the last 1 of 101) 14:18:41 e :D 14:18:55 Goes out of Insert mode and enter command mode 14:18:58 How do you do that? 14:19:19 Esc 14:19:32 Well . Esc : 14:19:39 No it does not 14:19:39 geek_cl, +1 14:19:56 I have to press Esc to do that 14:20:14 mehdi, +1 14:20:26 In command mode, please press 2b 14:20:38 Actually the 2 key and the b key 14:20:42 What happens? 14:20:49 invalid range 14:21:09 mehdi, O.O 14:21:13 moves back 2 words 14:21:25 ramzay, +1 14:21:27 +1 ramzay 14:21:31 right ramzay +1 14:21:42 But for me it does not 14:21:46 IF you use one command with a number before the command, the command is executed that number of times 14:22:18 mehdi, Please goes into insert mode and then just press ESC 14:22:21 And try again 14:22:33 Oh, I thought I had to enter it with `:2b` 14:22:34 +1 14:22:50 +1 14:22:51 but just '2b' works cool! 14:23:00 No, we are still out of the : part 14:23:04 ;) 14:23:18 Such a complex editor lol! 14:23:39 mehdi, it will get easier when you use it 14:23:40 Or let's say huge editor 14:23:58 I can bet that geek_cl can't live without vim 14:24:00 :D 14:24:07 :) 14:24:18 Ok 14:24:21 many of us. 14:24:29 yeah 14:24:32 #topic Search and replace 14:24:34 I use gedit often 14:24:59 mehdi, the first thing I do when I open my session is open my terminal 14:25:02 :D 14:25:15 :) 14:25:30 Ok, now, how do you look for a word (we called string) into a text file? 14:25:42 x3mboy edits with cat > filename. That's his secret ;) 14:25:52 '/' 14:25:58 x3mboy: I use `? word` 14:26:02 skamath, ssshhhh nobody else now 14:26:31 borg0, +1 14:26:33 mehdi, +1 14:26:42 Those 2 are search methods 14:26:52 that's bottom-up search mehdi 14:27:11 The difference? / looks Top to bottom and ? looks Botton to top 14:27:12 So what is the other method? 14:27:13 dominicpg, +1 14:27:24 * 14:27:41 +1 14:27:43 Just search forward and backward 14:28:03 So, how do you look the next ocurrence of the string? 14:28:06 x3mboy: Are there any shortcuts for fast navigations to first and end of file? 14:28:16 n N 14:28:17 n & N 14:28:25 gg and G 14:28:50 mehdi, ramzay answer you 14:28:51 Cool 14:28:52 gg and G 14:28:57 geek_cl, borg0 +1 14:28:57 ramzay: +1 14:29:09 n and N are to go to next and previuos ocurrence 14:29:35 That's nice 14:29:56 I have a big problem with vim, though I kind of liked it since 2009 14:30:15 mehdi, what's the problem??? 14:30:20 Ok, replace??? 14:30:24 x3mboy: Can you tell me how to copy and paste lines and words in vim? 14:30:25 Anyone? 14:30:38 mehdi, that will be the end of this session 14:30:41 .,$s/word1/word2/g 14:30:45 I used mouse for that :(( 14:30:48 :%s/a/b/g 14:31:04 OK, sorry. I can wait for that 14:31:23 ramzay: I did not understand it 14:31:33 ramzay, borg0 +1 14:31:56 It looks realy weird but to search and replace we need to use a little hard command 14:32:42 What is the %s part? 14:32:49 whole file 14:32:59 search 14:33:32 It's weird, nobody ask how to unhighlight the searched words 14:33:33 :D 14:33:41 ramzay: what is .,$s? 14:34:03 current line to end of file search 14:34:10 thats because we re still fighting :p 14:34:17 :noh 14:34:24 nmnbd[m], LOL 14:34:35 Ok, do you need to ask something??? 14:34:57 Ok, lets search zsh 14:35:10 OMG, x3mboy please tel us how to unhighlight 14:35:11 Please type /zsh into the command mode 14:35:16 :nohl 14:35:25 OR :noh 14:35:30 x3mboy++ 14:35:32 unhighlight search a string that doesn't exist 14:35:54 pany, that's an engineer solution! 14:36:07 haha 14:36:16 But the real way should be to use :nohl or :noh command 14:36:27 That means "no highlight" 14:36:36 Do yuou search for zsh string? 14:36:39 by example i can highlight any occurrence with # 14:36:54 I did 14:37:08 zshrc is selected 14:37:25 zshrc is highlighted 14:38:01 Beatiful 14:38:12 mehdi, +1 14:38:16 How? 14:38:19 How so? 14:39:11 Now, move to the next ocurrence 14:39:44 How should I do that? 14:39:46 n 14:40:04 Oh sorry I forgot to hit Enter 14:40:23 Now, press c 14:40:39 Ok nothing happens 14:40:46 c appears at the bottom 14:41:41 mehdi: +1 14:41:41 Does that copy the pattern? 14:42:14 And can we paste it with p ? 14:42:25 w 14:42:31 Sorry 14:42:45 The idea was, search, press c and then press w 14:42:59 Remember what w means??? 14:43:09 word ? 14:43:11 word 14:43:15 =1 14:43:16 word 14:43:16 +1 14:43:18 Word 14:43:21 C means change 14:43:30 So, c+w means change word 14:43:32 It deletes one word 14:43:58 So, search: / and ? 14:44:05 n and N next and previous 14:44:32 :%s/WordToSearch/WordToReplace/g search and replace 14:44:42 And c+w change a word 14:45:00 #topic deletion 14:45:04 To delete characters in command mode we use x 14:45:11 And d command 14:45:13 Cool 14:45:15 d means delete 14:45:25 So if we use d+w that will mean??? 14:45:48 delete word 14:45:56 +1 14:46:02 d+b???? 14:46:20 dekete back 14:46:23 +1 14:46:27 dd 14:46:30 ??? 14:46:34 delete line 14:46:52 dG??? 14:47:27 delete all below current line 14:47:32 (u undo :P ) 14:47:32 the whole file? 14:47:46 mehdi, if you are in the first character, yes 14:47:57 It means delete from current position until the end of file 14:48:17 dgg means delete from current position until the beggining of the file 14:48:21 Ok 14:48:25 That was easy 14:48:31 Now, the Yank 14:48:36 #topic Yank 14:49:26 +1 14:49:29 Do you know what yank (y) means??? 14:49:30 never heard of it 14:49:34 lol 14:49:35 copy 14:50:26 borg0, +1 14:50:27 Copy 14:50:39 How is that used? 14:51:06 Move into line 9 column 9 14:51:09 And press y 14:51:44 And then w 14:51:58 Nothing seems to happens, right? 14:52:10 it just skips a word 14:52:11 yes 14:52:12 nothing 14:52:22 Everyone less borg0 or any of the chairmans, what we did??? 14:52:50 Nothing??? 14:52:57 No way 14:53:02 What I just said that y means??? 14:53:07 copying 14:53:13 And w? 14:53:19 word ??? 14:53:20 word 14:53:22 Ok 14:53:24 copy one word 14:53:28 mehdi, +1 14:53:33 But we need to paste it 14:53:39 :D 14:53:51 Because now is in the "Clipboard" 14:53:59 In vim is called buffer 14:54:11 now goes to the line bellow and press p 14:54:20 Into line 11 14:54:24 That should be empty 14:54:35 Good, that pastes the word 14:54:57 Now, we can combine our knowledge 14:55:12 y+b, y+G, y+gg??? 14:55:22 why did it copy the space at the end? 14:55:34 y+b: copy one word back 14:55:44 borg0, becuase the delimiter of a "word" is a space 14:55:51 y+G copy to the end of the file 14:55:57 y+gg: copy to the beginning of the file 14:56:17 mehdi, +1 14:56:22 You are on fire right now 14:56:35 But how to select what I need??? 14:56:36 :D 14:56:40 For exampe 2 words? 14:56:57 :y+2w? 14:56:58 2yw 14:57:03 borg0, +1 14:57:09 mehdi, without the : 14:57:20 Another shortcut, $ 14:57:21 ok sorry 14:57:25 $ meanse end of line 14:57:37 :%s/meanse/means/g 14:58:24 Now, let's see 5yy??? 14:58:40 copy 5 lines 14:58:49 x3mboy: and what is beginning of the line? 14:59:00 shortcut I mean as opposed to $ 14:59:15 ^ 14:59:48 So ^ beggining of line, $ end of line 15:00:02 Nyy where N is any number, meanse N lines 15:00:07 And to paste just p or P 15:00:45 The difference between p and P is paste after current position and before position 15:00:47 So it copies 10 lines forward? 15:01:45 +1 15:01:53 mehdi, for select text to copy we need to use visual mode, but we will do that in vim 102 15:02:02 Now just how to close? 15:02:11 Saving, and without save the changes???? 15:02:27 :w 15:02:29 ZZ ZQ 15:02:30 :q! 15:02:32 :wq saving :q! without saving 15:02:54 ZZ saving ZQ without saving 15:02:54 :wq save and quit 15:03:06 :w alone, just save 15:03:18 what is ZZ? never used it 15:03:29 mehdi, Save and exit 15:03:41 Well my people, that's all 15:03:43 ;qa! 15:03:52 and :x 15:03:58 That's really cool 15:04:00 .thanks x3mboy 15:04:09 We learn how to move, insert, search, replace, copy and paste test 15:04:11 Thanks Eduard 15:04:19 It really helped 15:04:38 s/test/text/g 15:04:57 Thank you x3mboy 15:05:04 Any question??? 15:05:13 one 15:05:26 Please, go ahead 15:05:29 beginning of search/replace what can we use? 15:05:35 s, $, %S 15:05:36 ? 15:05:43 I am a bit confused 15:06:02 :%s/meanse/means/g 15:06:39 Is that it? 15:07:02 Thanks 15:07:38 The first one is the word to search, and the second one the one to replace 15:08:08 Thank you sir 15:08:16 Anything else??? 15:08:18 and g is ? 15:08:28 #topic Q&A 15:08:44 g in the search command is just to apply 15:08:51 Just a small recap on insert if possible please? 15:09:36 We have three ways to insert: i s and o and O ? 15:12:00 i insert in the current position 15:12:13 mehdi: i and a and o 15:12:28 s replace the actual character and insert 15:13:07 thanks 15:13:11 o insert one line down 15:13:12 pany: +1 15:13:21 bt0: +1 15:13:23 O insert one line up 15:14:00 Is there a way to go a number of words forward or backward? 15:14:42 Oh sorry it was Nw and Nb 15:14:48 Forgot it 15:14:56 yeah 15:15:43 Maybe another guy can help me here, (about the g means in the search and replace commands) 15:16:22 ? 15:16:56 x3mboy, I think it's "global" from regex? 15:17:15 mech, probably 15:17:59 linuxEnthusiast, the problem with search and replace is that is being done by a regular expression or regex, that is a quite advance term 15:18:20 Just we need to know that we use s/word1/word2/g to search and replace all ocurrences 15:18:27 yeah, that come from the sed command 15:18:44 got it, thnx 15:19:35 means global 15:20:00 Ok, now we are done 15:20:13 thanks a lot 15:20:16 Thanks for assist and I hope you can find it usefull 15:20:20 great session 15:20:30 Great class 15:20:39 Really useful thanks 15:20:40 many thanks x3mboy 15:20:41 Logs will be published in the wiki: https://fedoraproject.org/wiki/Classroom 15:21:03 And please stay tuned with the magazine, where we will publish the incoming sessions 15:21:37 looking forward to join the next one 15:21:39 Also, I will try to put some material (Just need to check the licence of the material), but some useful books and guidelines to use vim 15:21:40 goodbye 15:21:44 #endmeeting