vim

25.shell特殊符号cut命令 sort wc uniq tee tr split命令

安稳与你 提交于 2020-04-12 16:33:40
8.10 shell特殊符号cut命令 8.11 sort wc uniq命令 8.12 tee tr split命令 8.13 shell特殊符号下 8.10 shell特殊符号cut命令: ~1. *任意个任意字符 通配符 ~2. ?任意一个字符 代表任意的一个字符 ~3. #注释字符 前面加#,代表不生效。可用在解释说明 ~4. \脱义字符 (详细看实例) 取消掉原意,只代表他本身,可用\ ~5. |管道符 下面有讲和管道符有关的命令 实例 4. [root@axinlinux-01 ~]# a=1 [root@axinlinux-01 ~]# b=2 [root@axinlinux-01 ~]# c=$a$b 我们想让c=$a$b这串字符本身是不生效的,因为我们用$会调用a的变量 [root@axinlinux-01 ~]# echo $c 所以他会显示,a和b的变量 12 [root@axinlinux-01 ~]# c='$a$b' 我们可以加单引号来代表c=$a$b的本身 [root@axinlinux-01 ~]# echo $c $a$b [root@axinlinux-01 ~]# c=\$a\$b 也可以用脱义字符\反推一下,来代表$a或$b这些字符本身 [root@axinlinux-01 ~]# echo $c $a$b -----------------

Vim Plugins For Node.js

做~自己de王妃 提交于 2020-04-12 11:56:29
使用Vim作为Node.js的IDE环境也是个不错的选择。 Vim: http://www.vim.org/download.php Node.js在Github上也有一篇关于Vim插件的推荐文章。 https://github.com/joyent/node/wiki/Vim-Plugins 下面就整理一下配置Vim的一些步骤。 1. Pathogen 这是Vim中用来方便管理插件的插件,有了它,之后介绍的很多插件安装就会显得简单。 在~\vimfiles下新建两个文件夹,~\vimfiles\autoload和~\vimfiles\bundle 复制 pathogen.vim 到~\vimfiles\autoload\pathogen.vim 记事本打开~\_vimrc,在最后加入如下代码: "自动缩进 set autoindent "语法高亮 syntax on "自动检测文件类型并加载相应的设置 filetype plugin indent on "不自动换行 set nowrap "智能对齐方式 set smartindent "一个tab是4个字符 set tabstop=4 "按一次tab前进4个字符 set softtabstop=4 "显示行号 set number "缺省不产生备份文件 set nobackup call pathogen#infect() 2.

Git学习版本回退和管理文件的修改及删除操作

谁说胖子不能爱 提交于 2020-04-11 18:42:08
版本回退 前面我们成功的提交了一次mygit.txt,下面咱对它进行修改,内容如下: Hello Git Git is so easy. 然后用git status来跟踪该文件的状态: 可以看到hellogit.txt已经被修改过了,到底这次修改的内容与上次的内容有什么不同的,咱们可以使用git diff查看(若想退出当前状态不再看下去,按下Q键即退出;其他退出亦同。): 当然你也可以查看上次提交的信息,使用git log: 通过前面一章我们知道,该文件还处于工作区,因此我们又可以使用add、commit操作了: 这里笔者偷了个懒,直接用-m表示提交的信息,当然在学习过程中咱可以这样,但实际工作中一般不这么写。 好了,提交完后咱再用git status来跟踪一下(建议多使用git status)状态: 这里依然是:Git告诉咱们当前没有需要提交的修改,而且工作目录是干净的。 下面再学一个命令:git reflog,它主要用来记录你的每一次命令和commit id,这个命令非常有效,也建议大家常用。 可以看到咱提交的id号和提交的message被显示出来了。 加入你现在不想修改了,想回到原来那个版本,该怎么办呢?别急,这一点Git早就帮我们想好了,使用git reset --hard HEAD^ 注意:这里HEAD上面^表示回到上一个版本,如果想回到前面第五个版本呢?我们可以用git

LVS之-LAMP搭建wordpress

偶尔善良 提交于 2020-04-08 12:26:21
author:JevonWei 版权声明:原创作品 LVS搭建wordpress,涉及的知识点有DNS,LAMP,NFS及LVS 网络拓扑图 网络环境 NFS 192.168.198.130 mysql 192.168.198.132 RS1 192.168.198.138 RS2 192.168.198.120 LVS: DIP 192.168.198.128 vip 172.16.253.105 DNS 172.16.252.248 Client 172.16.254.150 RS1,RS2的网关指向192.168.198.128,client的DNS指向DNS服务器172.16.252.248 VS [root@VS ~]# iptables -F 添加路由转发选项 [root@VS ~]# vim /etc/sysctl.d/99-sysctl.conf net.ipv4.ip_forward=1 [root@VS ~]# sysctl -p /etc/sysctl.d/99-sysctl.conf \\刷新生效 net.ipv4.ip_forward = 1 配置LVS的调度算法为rr轮询 [root@VS ~]# yum -y install ipvsadm [root@VS ~]# ipvsadm -A -t 172.16.253.105:80 -s rr \\

Vim杂记:Sublime的配色方案

笑着哭i 提交于 2020-04-08 07:33:45
一、前言                                     爱美之心人皆有之,sublime的配色实在好看,于是希望Vim也能这样。 二、配置                                     1.下载monokai(https://github.com/sickill/vim-monokai),然后将Monokai.vim保存到~/.vim/colors下; 2.配置~/.vimrc文件,添加 syntax enable 、 colorscheme Monokai 两行。我的~/.vimrc文件如下 set encoding=utf-8 set fileencoding=utf-8 set fileencodings=ucs-bom,utf-8,chinese,cp936 set guifont=Consolas:h15 language messages zh_CN.utf-8 set lines=45 columns=100 set number set autoindent set smartindent set tabstop=4 set autochdir set shiftwidth=4 set foldmethod=manual syntax enable colorscheme Monokai set

开发者和系统管理者最喜爱的开源工具Vim 起步学习的五个技巧

﹥>﹥吖頭↗ 提交于 2020-04-08 07:25:38
多年来,我一直想学 Vim。如今 Vim 是我最喜欢的 Linux 文本编辑器,也是开发者和系统管理者最喜爱的开源工具。我说的学习,指的是真正意义上的学习。想要精通确实很难,所以我只想要达到熟练的水平。 我使用了这么多年的 Linux ,我会的也仅仅只是打开一个文件,使用上下左右箭头按键来移动光标,切换到插入模式,更改一些文本,保存,然后退出。但那只是 Vim 的最最基本的操作。我的技能水平只能让我在终端使用 Vim 修改文本,但是它并没有任何一个我想象中强大的文本处理功能。这样我完全无法用 Vim 发挥出胜出 Pico 和 Nano 的能力。 所以到底为什么要学习 Vim?因为我花费了相当多的时间用于编辑文本,而且我知道还有很大的效率提升空间。为什么不选择 Emacs,或者是更为现代化的编辑器例如 Atom?因为 Vim 适合我,至少我有一丁点的使用经验。而且,很重要的一点就是,在我需要处理的系统上很少碰见没有装 Vim 或者它的弱化版(Vi)。如果你有强烈的欲望想学习对你来说更给力的 Emacs,我希望这些对于 Emacs 同类编辑器的建议能对你有所帮助。 花了几周的时间专注提高我的 Vim 使用技巧之后,我想分享的第一个建议就是必须使用它。虽然这看起来就是明知故问的回答,但事实上它比我所预想的计划要困难一些。我的大多数工作是在网页浏览器上进行的

完美解决错误:libhdf5_hl.so.100(XXX): cannot open shared object file: No such file or directory,Error127

拜拜、爱过 提交于 2020-04-08 04:34:01
sudo make runtest -j16 报错 .build_release/tools/caffe .build_release/tools/caffe: error while loading shared libraries: libhdf5_hl.so.100: cannot open shared object file: No such file or directory Makefile:545: recipe for target 'runtest' failed make: *** [runtest] Error 127解决方案cd /etc/ld.so.conf.d/ touch anaconda3.conf sudo vim anaconda3.conf //打开文件 输入以下内容: /home/user/anaconda3/lib sudo ldconfig 来源: https://www.cnblogs.com/laowangxieboke/p/12657565.html

Open several files in new tabs with VIM

雨燕双飞 提交于 2020-04-08 00:04:59
问题 How can I open several files using wildcards in a new tab for each file with VIM? Similar to How can I open several files at once in Vim? but in new tabs instead of buffers. 回答1: If you are in Vim, this command will open each html file in the current directory in its own tab and restore syntax support (disabled by :argdo ): :args *.html | argdo tabe | tabdo syntax on If you are in your shell, go for the other answers. 回答2: Use the -p flag: vim -p *.c The above will open all files matching *.c

Open several files in new tabs with VIM

瘦欲@ 提交于 2020-04-08 00:04:34
问题 How can I open several files using wildcards in a new tab for each file with VIM? Similar to How can I open several files at once in Vim? but in new tabs instead of buffers. 回答1: If you are in Vim, this command will open each html file in the current directory in its own tab and restore syntax support (disabled by :argdo ): :args *.html | argdo tabe | tabdo syntax on If you are in your shell, go for the other answers. 回答2: Use the -p flag: vim -p *.c The above will open all files matching *.c

Open several files in new tabs with VIM

佐手、 提交于 2020-04-08 00:04:10
问题 How can I open several files using wildcards in a new tab for each file with VIM? Similar to How can I open several files at once in Vim? but in new tabs instead of buffers. 回答1: If you are in Vim, this command will open each html file in the current directory in its own tab and restore syntax support (disabled by :argdo ): :args *.html | argdo tabe | tabdo syntax on If you are in your shell, go for the other answers. 回答2: Use the -p flag: vim -p *.c The above will open all files matching *.c