vim

Tomcat优化

旧巷老猫 提交于 2020-01-14 18:40:33
了解tomcat安装 博文结构 开启Manager管理页面 开启host-mangent管理页面 分割Tomcat的运行日志 定义Tomcat 404错误返回的页面 Tomcat服务的内存优化 Tomcat线程池的优化 更改Tomcat服务的请求方式 一.开启Manager管理页面 当正常访问Tomcat页面时,会出现如下: 修改tomcat配置文件(在最后添加必须在/tomcat闭合中添加如下) [root@localhost /]# vim /usr/local/tomcat/conf/tomcat-users.xml <role rolename="manager-gui"/> <user username="tomcat" password="123456" roles="manager-gui"/> \\登录的用户名及密码 </tomcat-users> \\在这个上面添加 [root@localhost /]# vim /usr/local/tomcat/webapps/manager/META-INF/context.xml \\在这个配置文件中下面这段修改一下即可 <Context antiResourceLocking="false" privileged="true" > <Valve className="org.apache.catalina.valves

E10 errors in .vimrc

拜拜、爱过 提交于 2020-01-14 17:51:40
问题 I have encounter many E10 error while invoking vim: Error detected while processing /home/wzming/.vim/bundle/vundle/autoload/vundle.vim:^[[? 25l^[[J^M 3 line 8:^[[J^M 4 E10: \ should be followed by /, ? or &^[[J^M 5 line 11:^[[J^M 6 E10: \ should be followed by /, ? or &^[[J^M 7 line 14:^[[J^M 8 E10: \ should be followed by /, ? or &^[[J^M My .vimrc is as follows: set rtp+=~/.vim/bundle/vundle/ call vundle#rc() "let Vundle manage Vundle " required! Bundle 'gmarik/vundle' " My Bundles here: "

Vim and ASCII extended characters?

陌路散爱 提交于 2020-01-14 15:26:52
问题 I would like to know how can I set VIM 7.0 to show and work with ASCII extended characters without problem. 回答1: Vim (which is what vi resolves to on most systems) readily supports extended character sets. You might need to tell Vim which encoding to use, though. This is controlled by two options: :set encoding :set fileencoding If you have loaded a file that displays incorrectly, you may use :set encoding=<new encoding> to force the appropriate encoding. This changes the interpretation of

Regex find-and-replace in vim: Adding .0 to numbers

一世执手 提交于 2020-01-14 14:49:40
问题 I have a file which looks like below. 1 1 0 # 1 6 1 0 # 2 8 1 0 # 3 10 1 0 # 4 12 1 0 # 6 How can I add .0 to all numbers, except the numbers behind the #. I think this should not be too difficult to do with a regular expression, but my regex knowledge is too rusty.. 回答1: If your numbers after the # don't have spaces after them, you can use: :g/\([0-9]\+\) /s//\1.0 /g The use of () creates groups which you can refer to as \D in the replacement text, where D is the position of the group within

Regex find-and-replace in vim: Adding .0 to numbers

我是研究僧i 提交于 2020-01-14 14:49:06
问题 I have a file which looks like below. 1 1 0 # 1 6 1 0 # 2 8 1 0 # 3 10 1 0 # 4 12 1 0 # 6 How can I add .0 to all numbers, except the numbers behind the #. I think this should not be too difficult to do with a regular expression, but my regex knowledge is too rusty.. 回答1: If your numbers after the # don't have spaces after them, you can use: :g/\([0-9]\+\) /s//\1.0 /g The use of () creates groups which you can refer to as \D in the replacement text, where D is the position of the group within

Vim start with cursor where last went off [closed]

坚强是说给别人听的谎言 提交于 2020-01-14 12:59:44
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . How do i make Vim always start at the line I was at when i exited that given file last time? 回答1: Put this in your .vimrc: " When editing a file, always jump to the last cursor position au BufReadPost * \ if ! exists("g:leave_my_cursor_position_alone") | \ if line("'\"") > 0 && line ("'\"") <= line("$") | \ exe

nagios 监控

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-14 12:09:38
目录 Nagios监控 课程目标: 一、企业里常用的监控软件 二、Ngaios概述 三、Nagios监控流程 四、Nagios的安装 五、Nagios配置文件介绍 六、监控本机的公共服务 七、监控远程主机的公有服务 八、监控远程主机的私有服务 九、实现邮件报警 Nagios监控 课程目标: 了解监控端重要性 能够说出企业里常用端监控软件 了解Nagios的工作原理 掌握Nagios的安装配置 使用Nagios实现邮件报警 一、企业里常用的监控软件 1.监控软件具备功能 数据采集、数据保存、图像展示、报警系统 2.常见的监控软件 Cacti: Cacti是一套基于PHP、MySQL、[^ SNMP]、[^ RRDTool]开发端监测图像分析工具。它提供了非常强大端数据和用户管理功能。Cacti监控关注端是对数据端展示,却不关注数据异常后端反馈。 Nagios: Nagios是一款开源端免费网络监控报警服务,能有效监控Windows、Linux和Unix端主机状态,交换机、路由器和防火墙等网络设置,在系统或服务状态异常时发出邮件或短信报警第一时间通知运维人员,在状态恢复后发出正常端邮件或短信通知。Nagios有完善端插件功能,可以方便端根据应用服务扩展功能。 Zabbix:Zabbix是一个基于WEB界面的提供分布式监控以及网络监视功能端企业级端开源解决方案 [^ SNMP]:

Highlighting matches in Vim over an inverted pattern

╄→尐↘猪︶ㄣ 提交于 2020-01-14 09:47:30
问题 How may I highlight in Vim with the :match command the text that does not matches with the given pattern? So, I want the opposite of: :match myGroup /foo/ 回答1: Well, you could do something like: :match myBaseHighlight /foo/ :2match myGroup /./ where myBaseHighlight is defined to be your default appearance -- white on black, or whatever. :match will override :2match , so everything other than /foo/ will get the myGroup highlight. 来源: https://stackoverflow.com/questions/773554/highlighting

how to get c++ man pages on os x?

自古美人都是妖i 提交于 2020-01-14 08:39:27
问题 In Ubuntu, after install libstdc++6-x.x-doc, docs are available via man, for example for libstdc++-4.8-doc: man std::list man std::weak_ptr man std::ios_base Is it possible to install man pages for c++ (using brew or any other means) on OSX? The reason for specifically requiring man pages is so that I can access them from vim using SHIFT-K . Note: I'm using the XCode version of g++: snowch$ g++ -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=

Custom Vim HTML syntax

北战南征 提交于 2020-01-14 07:59:10
问题 I have a script that reads an HTML file and replaces occurrences of ~%foo%~ with a value set by Perl. Something like this: <span class="~%classname%~">~%hi_mom%~</span> Would produce something like this in the browser: <span class="classyclass">Hello World</span> Right so I want to use Vim syntax highlighting to distinguish the occurrences ~%foo%~ in the HTML. By default, the HTML syntax highlighting will make an HTML element's attribute values Magenta and I want the ~%foo%~ portion to be