RH033读书笔记(8)-Lab 9 Using vim
Lab 9 Using vim
Sequence 1: Navigating with vim
1. Log in as user student
2. [student@stationX ~]$ cp /etc/passwd ~
3. [student@stationX ~]$ vim ~/passwd
4. First, try moving around using such as the arrows, PgUp, PgDn.
They should all work as expected. Note, however, that on older systems they might
not.
5. moving from word to word with the w and b keys.
moving by sentence (the parentheses) and paragraph (the curly braces)
6. Try combining numbers with movement keys.
5w
2Down Arrow
7. Press the i key.
The arrow keys, Home and End still move your cursor
8. Exit insert mode by pressing Esc.
9. Try pressing the u key. This will undo each change that you made. Changes can be re-done
with Ctrl-r
10. The ex mode is invoked by typing : while in command mode.
11. At the ex prompt (:) enter set nu.
12. Try entering ex mode again and typing :set nonu.
13. Try jumping to line 5 by typing 5G.
G to the end
1G to the first line
14. search feature: /root.
press n and N to navigate.
15. :set nohls.
:set hls.
16. Try running :q. :q!
Sequence 2: Configuring vim
1. [student@stationX ~]$ vim ~/.vimrc
:set nu
:set wrapmargin=10
2. [student@stationX ~]$vim /etc/passwd again.
Sequence 3: Configuring basic sudo privileges with vim
1. [student@stationX ~]$ su -
2. [root@stationX ~]# visudo
3. /root
The line appears about halfway down the file and looks like this:
root ALL=(ALL) ALL
4. yyp
yy "yanks" (copies) the current line and p "pastes" it one line down.
5. cw studen Esc.
6. w cw stationX
The line should now read:
student stationX=(ALL) ALL
7. Exit insert mode by pressing Esc. :wq
8. [student@stationX ~]$ ls /etc/pki/CA
ls: /etc/pki/CA: Permission denied
[student@stationX ~]$ sudo ls /etc/pki/CA
Password:
private
9. sudo will remember that you have already authenticated for five minutes before prompting you
again.
Challenge Sequence 4: Learning more with vimtutor
1. [student@stationX ~]$ vimtutor
RH033读书笔记(8)-Lab 9 Using vim的更多相关文章
- RH033读书笔记(15)-Lab 16 The Linux Filesystem
Lab 16 The Linux Filesystem Goal: Develop a better understanding of Linux filesystem essentials incl ...
- RH033读书笔记(10)-Lab 11 Process Control
Lab 11 Process Control Sequence 1: Job Control 1. [student@stationX ~]$ su - 2. Begin some jobs in t ...
- RH033读书笔记(2)-Lab 3 Getting Help with Commands
Lab 3 Getting Help with Commands Sequence 1: Using the Help Tools 1. man -f keyword whatis keyword l ...
- RH033读书笔记(5)-Lab 6 Exploring the Bash Shell
Lab 6 Exploring the Bash Shell Sequence 1: Directory and file organization 1. Log in as user student ...
- RH033读书笔记(4)-Lab 5 File Permissions
Lab 5 File Permissions Sequence 1: Determining File Permissions 1. What is the symbolic representati ...
- RH033读书笔记(3)-Lab 4 Browsing the Filesystem
Lab 4 Browsing the Filesystem Sequence 1: Directory and File Organization 1. Log in as user student ...
- RH033读书笔记(7)-Lab 8 Introduction to String Processing
Lab 8 Introduction to String Processing Sequence 1: Exercises in string processing 1. Other than the ...
- RH033读书笔记(6)-Lab 7 Standard I/O and Pipes
Lab 7 Standard I/O and Pipes 1. [student@stationX ~]$ cat /proc/cpuinfo /proc/meminfo 2. [student@st ...
- RH033读书笔记(11)-Lab 12 Configuring the bash Shell
Sequence 1: Configuring the bash Shell Deliverable: A system with new aliases that clear the screen, ...
随机推荐
- 我在开发网站后得出的asp.Net网站优化总结
原文:我在开发网站后得出的asp.Net网站优化总结 asp.Net网站优化总结: 1.数据库优化: 首先是对查询语句的优化,开发时为了图快可以不考虑,但是后期维护时就必须要优化(比如:你调用代码生成 ...
- A Game of Thrones(12) - Eddard
The summons(['sʌm(ə)nz]召唤:传票) came in the hour before the dawn, when the world was still and grey. A ...
- Orchard
Orchard工作原理 概述 本文翻译仅供学习之用,了解Orchard工作原理设计思想.技术点及关键词,如有缺漏请不吝指正.鉴于能力有限定有诸多曲解或不完整的地方,请海涵.不定时完善整理. CMS不像 ...
- spring集成 JedisCluster 连接 redis3.0 集群
最近在公司做了 jedisCluster整合spring 的配置, 分享如下 客户端采用最新的jedis 2.7 1. maven依赖: <dependency> <groupId& ...
- 你有PSD的学位吗? - dp的日志 - 网易博客
你有PSD的学位吗? - dp的日志 - 网易博客 你有PSD的学位吗? 2011-08-01 12:58:40| 分类: 感悟 | 标签:自我提升 |字号 大中小 订阅 去年, ...
- TMS320F28335项目开发记录9_28335中断系统
28335中断系统 1.中断系统 在这里我们要十分清楚DSP的中断系统. C28XX一共同拥有16个中断源,当中有2个不可屏蔽的中断RESET和NMI.定时器1和定时器2分别使用中断13和14.这样还 ...
- 使用jquery+一般处理程序异步载入信息
需求:有时候.web界面对性能要求比較高.我们就不考虑使用asp.net控件.而是使用html标签+jquery+一般处理程序来进行异步处理. watermark/2/text/aHR0cDovL2J ...
- 在Laravel中一步一步创建Packages
首先要看一下Laravel官方文档,这是最新4.2的文档,假设想看中文的话点击此处,基本一样.这个github上的库setup-laravel4-package,也是一步一步介绍怎样创建一个包.并关联 ...
- Lichee (五岁以下儿童) sysconfig1.fex 配置系统
sysconfig配置系统,作为一个通用的软件平台,还希望通过它.能够适应用户不同的方案.通过给出一个相应的配置.用户的方案就能够自己主动执行,而不须要改动系统里面的代码,或者又一次给出參数. 一. ...
- 将Eclipse包括第一3正方形jar包裹Project Export并产生能够执行jar
于Project对,Export-Java-Runnable JAR file.需要注意的是一定要选择"Package required libraries into generated J ...