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, ...
随机推荐
- winXP JDK由1.8改为1.6
(1)直接在环境变量中删除配置的相关路径 path的值: C:\Documents and Settings\Administrator>path PATH=C:\Documents and S ...
- poj3311(状压dp)
题目连接:http://poj.org/problem?id=3311 题意:一个送披萨的,每次送外卖不超过10个地方,给你这些地方之间的时间,求送完外卖回到店里的总时间最小. 分析:跑一遍Floyd ...
- 你有PSD的学位吗? - dp的日志 - 网易博客
你有PSD的学位吗? - dp的日志 - 网易博客 你有PSD的学位吗? 2011-08-01 12:58:40| 分类: 感悟 | 标签:自我提升 |字号 大中小 订阅 去年, ...
- java--基于socket的网络传输开发
继http://blog.csdn.net/gaopeng0071/article/details/10959845此文章内容展开的研究. socket传输是基于tcp的网络传输协议进行的传输,tcp ...
- BEGINNING SHAREPOINT® 2013 DEVELOPMENT 第15章节--开发SP2013工作流应用程序 总结
BEGINNING SHAREPOINT® 2013 DEVELOPMENT 第15章节--开发SP2013工作流应用程序 总结 在SP2013中,工作流已经从SP Server中脱离 ...
- ecshop 调用其他数据库中的商品
ecshop中修改includes/cls_ecshop.php中第53行 function table($str) { /* if($str=='goods'){ return '`ecshop3' ...
- pygame系列_font游戏字体
在pygame游戏开发中,一个友好的UI中,漂亮的字体是少不了的 今天就给大伙带来有关pygame中字体的一些介绍说明 首先我们得判断一下我们的pygame中有没有font这个模块 1 if not ...
- LeetCode: Unique Binary Search Trees [095]
[题目] Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For ...
- 详细分析Java中断机制(转)
1. 引言 当我们点击某个杀毒软件的取消按钮来停止查杀病毒时,当我们在控制台敲入quit命令以结束某个后台服务时……都需要通过一个线程去取消另一个线程正在执行的任务.Java没有提供一种安全直接的方法 ...
- Android DES加密的CBC模式加密解密和ECB模式加密解密
DES加密共有四种模式:电子密码本模式(ECB).加密分组链接模式(CBC).加密反馈模式(CFB)和输出反馈模式(OFB). CBC模式加密: import java.security.Key; i ...