- 博客(38)
- 收藏
- 关注
原创 vim onelines to two lines
one line to two lines%s:\v(.).*:&^M& ctrl+v+ enter button= ^M
2017-02-16 09:59:53 1060
原创 pay attention to \r \n
CR = \rLine FeedLF = \nCarriage Return and Line FeedCRLF = \r\n linux: only LF \nwindows: \r\n
2017-02-16 03:11:08 1197
原创 vim add some characters according to lines
:%s/^\(.*\)$/"\1"cs: search and replace^\(.*\)$: the linechange to:"old line"c
2017-02-16 02:16:12 1002
原创 remove ^m or show space in filename
^m: when you copy windows file to linux ; will adddos2unix filename: remove them
2017-02-15 12:48:19 965
原创 show the front line
cat filename | head -n 10or tail sed -n '5,10p' filename :show 5-10 lines
2017-02-15 10:44:46 1243
原创 grep not condition
-v: notgrep 'meɪ' top2000.txt | grep -v 'meɪk'\|: orgrep 'meɪ' top2000.txt | grep -v 'meɪk\|meɪt'
2017-02-15 10:39:59 1300
原创 gerp single character
grep 'eɪ./' top2000.txt. : a single character '^d': d start'd$' d end
2017-02-15 09:07:55 1086
原创 firefox copy one column
firfox table2toolselect one word in the columncopypaste
2017-02-15 06:04:40 1065
原创 vim 每行去掉.后内容
%s/[^.]*//:每行最后一个.后面内容清楚//: 每行最后一个.后面内容清楚 %s/[.]*//清楚最后一个. 继续前两步
2017-02-15 05:01:46 1508
原创 linux split files according lines number
split -l 900 filename newfilename
2017-02-15 04:38:41 1025
原创 vim separate with . and replace all to end of line
:%s/[^.]*//:// :%s/[^1234567890]*//
2017-02-15 04:15:08 1071
原创 vim moving
0 start of one line ^ not blank start of one line $ end of one linegg: the first line of file G: the end line of filee:end of a word w: start of a word W: move a word50G: go to line 50%: match br
2017-02-15 04:14:06 1008
原创 list buffers in vim
How do I get a list of all the existing buffers?You can get a list of all the existing buffers using the “:buffers” or “:ls” or “:files” command. This list is called the ‘buffer list’.To display all th
2017-02-13 10:56:46 1095
原创 vim 行首行尾加字符
每行的行首都添加一个字符串:%s/^/要插入的字符串 每行的行尾都添加一个字符串:%s/$/要插入的字符串解释: % 代表针对被编辑文件的每一行进行后续操作 $ 代表一行的结尾处 ^ 代表一行的开头处
2017-02-12 06:32:56 16179
原创 counting files in current dir
determine how many files there are in the current directory, put in ls -l | wc -l.
2017-02-12 05:50:06 1120
原创 vim 多行comment uncomment
ctrl+v: enter visual block select multiple lines I: enter the first line of block input // or # escctrl+v select multiple lines x
2017-02-12 05:15:49 2212
原创 vim 复制一整行 复制多行
1、复制1)单行复制在命令模式下,将光标移动到将要复制的行处,按“yy”进行复制;2)多行复制在命令模式下,将光标移动到将要复制的首行处,按“nyy”复制n行;其中n为1、2、3……2、粘贴在命令模式下,将光标移动到将要粘贴的行处,按“p”进行粘贴
2017-02-12 05:04:07 109486 4
原创 vim 按字符长度排序
如果你安有 python3 或者 python 支持的话,可以 :py3 import vim :py3 vim.current.buffer[:] = list(sorted(vim.current.buffer, key=len))
2017-02-12 04:43:03 1713
原创 linux mount umount
sudo mount -t iso9660 -o loop /home/Downloads/my.iso /media/iso sudo umount /media/iso
2017-02-10 07:43:54 976
原创 vim commond
undo: u paste: ctrl shift v delete cursor to the word end: dw delete to the end line: D delete the line : dd
2017-02-09 22:38:38 957
原创 vim ctags
find ../linux-3.13/ -name ‘.h’ -o -name ‘.c’ -o -name ‘Makefile’ -o -name ‘.cpp’ -o -name ‘.asm’ -o -name ‘*.S’ > cscope.filescscope -b # this will gives cscope database cscope.outctags -L cscope.files
2017-02-09 22:17:15 890
原创 notepad++ function list not working
here is a functionList.xml file in your %APPDATA% directory. please delete
2017-02-08 05:20:08 1535
原创 python3 install
sudoapt−getinstallbuild−essentialcheckinstall sudo apt-get install build-essential checkinstall sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-d
2017-02-07 01:53:28 1246
原创 python install in linux
sudo apt-get install build-essential python-dev Even though python-dev is for python2.7 it will still bring in all the necessary dependencies.You will then need to do:./configure make sudo make inst
2017-02-06 08:04:11 1033
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人