安装了cygwin之后,经常使用vi需要显示诸如行号,语法高亮之类的, 于是就是在~/ 下创建 .vimrc 这样的文件,加入 set nu 但是发现不奏效,于是创建 .virc, 同样加入set nu 就有效了 再者,因为下载的是 vim-base的版本,所以语法不支持高亮 要下载完整版才能过支持 ...
#!/bin/bash #https://github.com/txthinking mkdir /tmp/_ curl https://raw.githubusercontent.com/txthinking/dotfiles/master/vim/.vimrc -o /tmp/_/.vimrc ... ...
分类:
系统相关 时间:
2017-09-26 15:58:58
阅读次数:
158
file 目的: 识别文件类型 格式:file 文件名 Linux下一切皆为文件 举例: file ~/.bashrc 为ASCII 编码的文本文件 file ~/.vimrc 为UTF-8 Unicode编码的text类型 file /bin/pwd 出现ELF 64-bit LSB execut ...
分类:
系统相关 时间:
2017-09-25 22:00:17
阅读次数:
197
一、shell编程入门必备基础 1、vim编辑器的命令,vimrc设置 2、150个linux基础命令 3、linux中基础的系统服务crond,ssh网络服务,nfs,rsync,inotify,lnmp,sersync,nmap等 二、变量分类 1、全局变量 2、局部变量 只对当前shell用户 ...
分类:
系统相关 时间:
2017-09-21 15:53:03
阅读次数:
224
我运维和dba通常使用的如下:setpastesetshortmess=atIsyntaxenablesyntaxonsetaisetrulersetautoindentsetnocompatiblesetmagicsetconfirmsethistory=1000setcursorlinehighlightCommentctermfg=lightblueguifg=darkbluesetcindentsettabstop=4setsofttabstop=4setshiftwidth=..
分类:
系统相关 时间:
2017-09-18 18:24:15
阅读次数:
151
vim的配置文件在/etc/vimrc,或者在~/目录下建立配置文件: touch .vimrc 高亮设置 一般来说vim对识别的程序是会自动设置高亮的,如果没有可以在.vimrc中添加 syntax on 并且可以调节高亮显示适配terminal的背景,如果背景是黑色 set background ...
分类:
编程语言 时间:
2017-09-16 14:55:14
阅读次数:
178
用vim新建一个python文件后,如pw.py,会自动填写文件头部,如: 1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 # Pw @ 2013-04-15 17:26:33 将以下代码加入/etc/vim/vimrc文件: function ...
分类:
编程语言 时间:
2017-09-14 14:58:37
阅读次数:
150
source $VIMRUNTIME/vimrc_example.vimsource $VIMRUNTIME/mswin.vimbehave mswin inoremap ii <ESC>set softtabstop=4set shiftwidth=4set autoindentset cinde ...
分类:
系统相关 时间:
2017-09-13 19:20:22
阅读次数:
304
colorschememurphy"设置配色方案
setnocompatible"关闭vi兼容模式
syntaxon"开启语法高亮
setnu"显示行号
setcursorline"突出显示当前行
setruler"打开状态栏标尺
setshiftwidth=4"设定<<和>>命令移动时的宽度为4
setsofttabstop=4"使得按退格键时可以一次删掉4个..
分类:
系统相关 时间:
2017-09-13 17:14:11
阅读次数:
171
set tabstop=4 set number set cul set cuc hi CursorColumn ctermfg=3 ctermbg=2 function InsertPythonComment() exe 'normal'.1.'G' let line = getline('.')... ...
分类:
系统相关 时间:
2017-09-13 01:35:17
阅读次数:
217