vim的妙用
最近在做单词表:
1 1 the a 2 2 be v 3 3 and c 4 4 of i 5 5 a a 6 6 in i 7 7 to t 8 8 have v 9 9 to i 10 10 it p 11 11 I p 12 12 that c 13 13 for i 14 14 you p 15 15 he p 16 16 with i 17 17 on i 18 18 do v 19 19 say v 20 20 this d 21 21 they p 22 22 at i 23 23 but c 24 24 we p 25 25 his a 26 26 from i 27 27 that d 28 28 not x 29 29 n''t x 30 30 by i 31 31 she p 32 32 or c 33 33 as c 34 34 what d 35 35 go v 36 36 their a 37 37 can v 38 38 who p 39 39 get v 40 40 if c 41 41 would v 42 42 her a 43 43 all d 44 44 my a 45 45 make v 46 46 about i 47 47 know v 48 48 will v 49 49 as i 50 50 up r 51 51 one m 52 52 time n 53 53 there e 54 54 year n 55 55 so r 56 56 think v 57 57 when c 58 58 which d 59 59 them p 60 60 some d 61 61 me p 62 62 people n 63 63 take v 64 64 out r 65 65 into i 66 66 just r 67 67 see v 68 68 him p 69 69 your a 70 70 come v 71 71 could v 72 72 now r 73 73 than c 74 74 like i 75 75 other j 76 76 how r 77 77 then r 78 78 its a 79 79 our a 80 80 two m 81 81 more r 82 82 these d 83 83 want v 84 84 way n 85 85 look v 86 86 first m 87 87 also r 88 88 new j 89 89 because c 90 90 day n 91 91 more d 92 92 use v 93 93 no a 94 94 man n 95 95 find v 96 96 here r 97 97 thing n 98 98 give v 99 99 many d 100 100 well r 101 101 only r 102 102 those d 103 103 tell v 104 104 one p 105 105 very r 106 106 her p 107 107 even r 108 108 back r 109 109 any d 110 110 good j 111 111 woman n 112 112 through i 113 113 us p 114 114 life n 115 115 child n 116 116 there r 117 117 work v 118 118 down r 119 119 may v 120 120 after i 121 121 should v 122 122 call v 123 123 world n 124 124 over i 125 125 school n 126 126 still r 127 127 try v 128 128 in r 129 129 as r 130 130 last m 131 131 ask v 132 132 need v 133 133 too r 134 134 feel v 135 135 three m 136 136 when r 137 137 state n 138 138 never r 139 139 become v 140 140 between i 141 141 high j 142 142 really r 143 143 something p 144 144 most r 145 145 another d 146 146 much d 147 147 family n 148 148 own d 149 149 out i 150 150 leave v 151 151 put v 152 152 old j 153 153 while c 154 154 mean v 155 155 on r 156 156 keep v 157 157 student n 158 158 why r 159 159 let v 160 160 great j 161 161 same d 162 162 big j 163 163 group n 164 164 begin v 165 165 seem v 166 166 country n 167 167 help v 168 168 talk v 169 169 where c 170 170 turn v 171 171 problem n 172 172 every a 173 173 start v 174 174 hand n 175 175 might v 176 176 American j 177 177 show v 178 178 part n 179 179 about r 180 180 against i 181 181 place n 182 182 over r 183 183 such d 184 184 again r 185 185 few d 186 186 case n 187 187 most d 188 188 week n 189 189 company n 190 190 where r 191 191 system n 192 192 each d 193 193 right r 194 194 program n 195 195 hear v 196 196 so c 197 197 question n 198 198 during i 199 199 work n 200 200 play v 201 201 government n 202 202 run v 203 203 small j 204 204 number n 205 205 off r 206 206 always r 207 207 move v 208 208 like v 209 209 night n 210 210 live v 211 211 Mr n 212 212 point n 213 213 believe v 214 214 hold v 215 215 today r 216 216 bring v 217 217 happen v 218 218 next m 219 219 without i 220 220 before i 221 221 large j 222 222 all r 223 223 million m 224 224 must v 225 225 home n 226 226 under i 227 227 water n 228 228 room n 229 229 write v 230 230 mother n 231 231 area n 232 232 national j 233 233 money n 234 234 story n 235 235 young j 236 236 fact n 237 237 month n 238 238 different j 239 239 lot n 240 240 right n 241 241 study n 242 242 book n 243 243 eye n 244 244 job n 245 245 word n 246 246 though c 247 247 business n 248 248 issue n 249 249 side n 250 250 kind n
实际有更多,本来的文件是有序号,单词和词性的,不过在此我是不需要的
首先用vim打开,使用命令:对所有行::%s/\v^(\s*\S+\s+\S+).+/\1/ 只保留第1列和第2列,结果:
1 1 the 2 2 be 3 3 and 4 4 of 5 5 a 6 6 in 7 7 to 8 8 have 9 9 to 10 10 it 11 11 I 12 12 that 13 13 for 14 14 you 15 15 he 16 16 with 17 17 on 18 18 do 19 19 say 20 20 this 21 21 they 22 22 at 23 23 but 24 24 we 25 25 his 26 26 from 27 27 that 28 28 not 29 29 n''t 30 30 by 31 31 she 32 32 or 33 33 as 34 34 what 35 35 go 36 36 their 37 37 can 38 38 who 39 39 get 40 40 if 41 41 would 42 42 her 43 43 all 44 44 my 45 45 make 46 46 about 47 47 know 48 48 will 49 49 as 50 50 up 51 51 one 52 52 time 53 53 there 54 54 year 55 55 so 56 56 think 57 57 when 58 58 which 59 59 them 60 60 some 61 61 me 62 62 people 63 63 take 64 64 out 65 65 into 66 66 just 67 67 see 68 68 him 69 69 your 70 70 come 71 71 could 72 72 now 73 73 than 74 74 like 75 75 other 76 76 how 77 77 then 78 78 its 79 79 our 80 80 two 81 81 more 82 82 these 83 83 want 84 84 way 85 85 look 86 86 first 87 87 also 88 88 new 89 89 because 90 90 day 91 91 more 92 92 use 93 93 no 94 94 man 95 95 find 96 96 here 97 97 thing 98 98 give 99 99 many 100 100 well 101 101 only 102 102 those 103 103 tell 104 104 one 105 105 very 106 106 her 107 107 even 108 108 back 109 109 any 110 110 good 111 111 woman 112 112 through 113 113 us 114 114 life 115 115 child 116 116 there 117 117 work 118 118 down 119 119 may 120 120 after 121 121 should 122 122 call 123 123 world 124 124 over 125 125 school 126 126 still 127 127 try 128 128 in 129 129 as 130 130 last 131 131 ask 132 132 need 133 133 too 134 134 feel 135 135 three 136 136 when 137 137 state 138 138 never 139 139 become 140 140 between 141 141 high 142 142 really 143 143 something 144 144 most 145 145 another 146 146 much 147 147 family 148 148 own 149 149 out 150 150 leave 151 151 put 152 152 old 153 153 while 154 154 mean 155 155 on 156 156 keep 157 157 student 158 158 why 159 159 let 160 160 great 161 161 same 162 162 big 163 163 group 164 164 begin 165 165 seem 166 166 country 167 167 help 168 168 talk 169 169 where 170 170 turn 171 171 problem 172 172 every 173 173 start 174 174 hand 175 175 might 176 176 American 177 177 show 178 178 part 179 179 about 180 180 against 181 181 place 182 182 over 183 183 such 184 184 again 185 185 few 186 186 case 187 187 most 188 188 week 189 189 company 190 190 where 191 191 system 192 192 each 193 193 right 194 194 program 195 195 hear 196 196 so 197 197 question 198 198 during 199 199 work 200 200 play 201 201 government 202 202 run 203 203 small 204 204 number 205 205 off 206 206 always 207 207 move 208 208 like 209 209 night 210 210 live 211 211 Mr 212 212 point 213 213 believe 214 214 hold 215 215 today 216 216 bring 217 217 happen 218 218 next 219 219 without 220 220 before 221 221 large 222 222 all 223 223 million 224 224 must 225 225 home 226 226 under 227 227 water 228 228 room 229 229 write 230 230 mother 231 231 area 232 232 national 233 233 money 234 234 story 235 235 young 236 236 fact 237 237 month 238 238 different 239 239 lot 240 240 right 241 241 study 242 242 book 243 243 eye 244 244 job 245 245 word 246 246 though 247 247 business 248 248 issue 249 249 side 250 250 kind
当使用命令:对所有行::%s/\v^(\s*\S+)(\s+\S+).+/\2/ 只保留第2列,结果:
1 the 2 be 3 and 4 of 5 a 6 in 7 to 8 have 9 to 10 it 11 I 12 that 13 for 14 you 15 he 16 with 17 on 18 do 19 say 20 this 21 they 22 at 23 but 24 we 25 his 26 from 27 that 28 not 29 n''t 30 by 31 she 32 or 33 as 34 what 35 go 36 their 37 can 38 who 39 get 40 if 41 would 42 her 43 all 44 my 45 make 46 about 47 know 48 will 49 as 50 up 51 one 52 time 53 there 54 year 55 so 56 think 57 when 58 which 59 them 60 some 61 me 62 people 63 take 64 out 65 into 66 just 67 see 68 him 69 your 70 come 71 could 72 now 73 than 74 like 75 other 76 how 77 then 78 its 79 our 80 two 81 more 82 these 83 want 84 way 85 look 86 first 87 also 88 new 89 because 90 day 91 more 92 use 93 no 94 man 95 find 96 here 97 thing 98 give 99 many 100 well 101 only 102 those 103 tell 104 one 105 very 106 her 107 even 108 back 109 any 110 good 111 woman 112 through 113 us 114 life 115 child 116 there 117 work 118 down 119 may 120 after 121 should 122 call 123 world 124 over 125 school 126 still 127 try 128 in 129 as 130 last 131 ask 132 need 133 too 134 feel 135 three 136 when 137 state 138 never 139 become 140 between 141 high 142 really 143 something 144 most 145 another 146 much 147 family 148 own 149 out 150 leave 151 put 152 old 153 while 154 mean 155 on 156 keep 157 student 158 why 159 let 160 great 161 same 162 big 163 group 164 begin 165 seem 166 country 167 help 168 talk 169 where 170 turn 171 problem 172 every 173 start 174 hand 175 might 176 American 177 show 178 part 179 about 180 against 181 place 182 over 183 such 184 again 185 few 186 case 187 most 188 week 189 company 190 where 191 system 192 each 193 right 194 program 195 hear 196 so 197 question 198 during 199 work 200 play 201 government 202 run 203 small 204 number 205 off 206 always 207 move 208 like 209 night 210 live 211 Mr 212 point 213 believe 214 hold 215 today 216 bring 217 happen 218 next 219 without 220 before 221 large 222 all 223 million 224 must 225 home 226 under 227 water 228 room 229 write 230 mother 231 area 232 national 233 money 234 story 235 young 236 fact 237 month 238 different 239 lot 240 right 241 study 242 book 243 eye 244 job 245 word 246 though 247 business 248 issue 249 side 250 kind
就可以随意的背单词了,爽吗
1 the a2 be v3 and c4 of i5 a a6 in i7 to t8 have v9 to i10 it p11 I p12 that c13 for i14 you p15 he p16 with i17 on i18 do v19 say v20 this d21 they p22 at i23 but c24 we p25 his a26 from i27 that d28 not x29 n''t x30 by i31 she p32 or c33 as c34 what d35 go v36 their a37 can v38 who p39 get v40 if c41 would v42 her a43 all d44 my a45 make v46 about i47 know v48 will v49 as i50 up r51 one m52 time n53 there e54 year n55 so r56 think v57 when c58 which d59 them p60 some d61 me p62 people n63 take v64 out r65 into i66 just r67 see v68 him p69 your a70 come v71 could v72 now r73 than c74 like i75 other j76 how r77 then r78 its a79 our a80 two m81 more r82 these d83 want v84 way n85 look v86 first m87 also r88 new j89 because c90 day n91 more d92 use v93 no a94 man n95 find v96 here r97 thing n98 give v99 many d100 well r101 only r102 those d103 tell v104 one p105 very r106 her p107 even r108 back r109 any d110 good j111 woman n112 through i113 us p114 life n115 child n116 there r117 work v118 down r119 may v120 after i121 should v122 call v123 world n124 over i125 school n126 still r127 try v128 in r129 as r130 last m131 ask v132 need v133 too r134 feel v135 three m136 when r137 state n138 never r139 become v140 between i141 high j142 really r143 something p144 most r145 another d146 much d147 family n148 own d149 out i150 leave v151 put v152 old j153 while c154 mean v155 on r156 keep v157 student n158 why r159 let v160 great j161 same d162 big j163 group n164 begin v165 seem v166 country n167 help v168 talk v169 where c170 turn v171 problem n172 every a173 start v174 hand n175 might v176 American j177 show v178 part n179 about r180 against i181 place n182 over r183 such d184 again r185 few d186 case n187 most d188 week n189 company n190 where r191 system n192 each d193 right r194 program n195 hear v196 so c197 question n198 during i199 work n200 play v201 government n202 run v203 small j204 number n205 off r206 always r207 move v208 like v209 night n210 live v211 Mr n212 point n213 believe v214 hold v215 today r216 bring v217 happen v218 next m219 without i220 before i221 large j222 all r223 million m224 must v225 home n226 under i227 water n228 room n229 write v230 mother n231 area n232 national j233 money n234 story n235 young j236 fact n237 month n238 different j239 lot n240 right n241 study n242 book n243 eye n244 job n245 word n246 though c247 business n248 issue n249 side n250 kind n