Linux GNU nano编辑器

^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Txt ^T To Spell

这些是帮助栏目,^G表示ctrl+g一起按

^G Get Help表示同时按ctrl和G,就是调出帮助菜单

这里声明一下^表示键盘上的ctrl键,上个只要是做过编程的朋友应该都清楚,^G表示同时按下ctrl和g
(F1)表示按(F1)也是一样的 ,M-表示使用alt+后面的键

^G ==F1) Invoke the help menu
调用帮助菜单

^X ==(F2) Close currently loaded file/Exit from nano
退出

^O ==(F3) Write the current file to disk == ^O WriteOut
保存
然后回车就保存了

^J ==(F4) Justify the current paragraph
调整当前段落(配置文件的不要用这东西,格式一下就出问题了哦)

^R ==(F5) Insert another file into the current one
插入其他的文件到当前的文件,而且查找文件的时候支持tab

^W ==(F6) Search for text within the editor

查找
^Y ==(F7) Move to the previous screen
上一屏幕
^V ==(F8) Move to the next screen
下一屏幕
^K ==(F9) Cut the current line and store it in the cutbuffer
裁减当前一排并保存在缓冲区

^U ==(F10) Uncut from the cutbuffer into the current line
将缓冲区的东西粘贴到此

^C ==(F11) Show the position of the cursor
显示光标位置

^T ==(F12) Invoke the spell checker, if available

调用拼写检查程序

^P Move up one line

向上移动一行
^N Move down one line

向下移动一

^F Move forward one character
向前移动光标一格

^B Move back one character
向后移动光标一格

^A Move to the beginning of the current line
移动到当前行的开头

^E Move to the end of the current line
移动到当前行的末尾

^L Refresh (redraw) the current screen
刷新当前屏幕

^^ (M-A) Mark text at the current cursor location
标记文本

^D Delete the character under the cursor

删除光标后一个字母
^H Delete the character to the left of the cursor
向左边删一个字母
^I Insert a tab character
插入一个tab值
^ (F14) (M-R) Replace text within the editor

查找并且替换
^M Insert a carriage return at the cursor position
插入一个回车
^_ (F13) (M-G) Go to a specific line number

跳转到某行
^Space Move forward one word

前进一个单词
M-Space Move backward one word
后退一个单词
M-] Find other bracket
搜索下一个括号

M-< Open previously loaded file
打开先前加载的文件

M-> Open next loaded file

打开下一个加载的文件

M-C Constant cursor position enable/disable

M-I Auto indent enable/disable
是否首行缩进

M-Z Suspend enable/disable
是否悬挂

M-X Help mode enable/disable
帮助模式

M-M Mouse support enable/disable

鼠标支持

M-Y Color syntax highlighting enable/disable
语法加亮

  • 5
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: 是的,下面是另一个使用Python Tkinter模块创建的简单文本编辑器的代码: ```python import tkinter as tk from tkinter import messagebox, filedialog class Application(tk.Frame): def __init__(self, master=None): super().__init__(master) self.master = master self.master.title('简单文本编辑器') self.master.geometry('600x400') self.create_widgets() def create_widgets(self): self.textbox = tk.Text(self.master, font=('Arial', 14)) self.textbox.pack(expand=True, fill='both') menubar = tk.Menu(self.master) filemenu = tk.Menu(menubar, tearoff=0) filemenu.add_command(label='新建', command=self.new_file) filemenu.add_command(label='打开', command=self.open_file) filemenu.add_command(label='保存', command=self.save_file) filemenu.add_separator() filemenu.add_command(label='退出', command=self.quit_editor) menubar.add_cascade(label='文件', menu=filemenu) editmenu = tk.Menu(menubar, tearoff=0) editmenu.add_command(label='撤销', command=self.textbox.edit_undo) editmenu.add_command(label='重做', command=self.textbox.edit_redo) menubar.add_cascade(label='编辑', menu=editmenu) self.master.config(menu=menubar) def new_file(self): self.textbox.delete('1.0', 'end') def open_file(self): file_path = filedialog.askopenfilename(filetypes=[('Text Files', '*.txt'), ('All Files', '*.*')]) if file_path: with open(file_path, 'r') as f: self.textbox.delete('1.0', 'end') self.textbox.insert('end', f.read()) def save_file(self): file_path = filedialog.asksaveasfilename(filetypes=[('Text Files', '*.txt'), ('All Files', '*.*')]) if file_path: with open(file_path, 'w') as f: f.write(self.textbox.get('1.0', 'end')) def quit_editor(self): if messagebox.askyesno('退出', '是否要退出编辑器?'): self.master.destroy() if __name__ == '__main__': root = tk.Tk() app = Application(master=root) app.mainloop() ``` 这个简单的文本编辑器除了具有新建、打开、保存和退出等基本功能外,还添加了撤销和重做的编辑功能。您可以将代码保存为 `.py` 文件并在命令行或任何Python IDE中运行。 ### 回答2: 除了常见的文本编辑器如Microsoft Word、Notepad++和Sublime Text等之外,还有其他许多简单的文本编辑器可供选择。以下是其中几个简单且常用的文本编辑器: 1. Vim:Vim是一个高度可定制的文本编辑器,具有许多实用的功能和快捷键。不过使用Vim需要一些学习和适应的过程。 2. Emacs:Emacs是另一个高度可定制的文本编辑器,广泛用于程序开发和文本编辑。它内置了许多功能和扩展,可以通过添加插件来满足个人需求。 3. Atom:Atom是一个开源的、跨平台的文本编辑器,具有强大的社区支持。它提供了丰富的插件和主题,可轻松定制和扩展编辑器的功能。 4. Notepad:Notepad是Windows操作系统自带的文本编辑器,它非常简单易用,适合进行简单的文本编辑和查看。 5. GNU Nano:GNU Nano是一个小巧而功能强大的文本编辑器,支持基本的文本编辑操作,并具有语法高亮、撤销/重做等功能。 除此之外,还有许多其他的简单文本编辑器供选择,可以根据个人的需求和喜好进行选择和使用。 ### 回答3: 还有其他很多简单的文本编辑器可供选择。除了常见的Microsoft Word和Notepad外,还有以下几个简单易用的文本编辑器: 1. Sublime Text:这是一款支持多种编程语言的文本编辑器,它具有代码高亮、自动补全、括号匹配等功能,适用于编程任务。 2. Atom:这是Github开发的一款开源文本编辑器,界面简洁,支持插件扩展,可以根据个人需求自定义编辑器的功能。 3. Visual Studio Code:这是一款由Microsoft开发的轻量级文本编辑器,支持多种编程语言,拥有强大的代码智能提示、调试功能等。 4. Notepad++:这是一款Windows平台上常用的文本编辑器,具有代码高亮、括号匹配、宏录制等功能,适用于一般文本编辑任务。 5. Vim:这是一款功能强大的文本编辑器,适用于Linux和Unix系统,拥有无数的插件和配置选项,可根据用户需求进行高度定制。 以上只是其中几个简单文本编辑器的例子,根据个人需求和使用习惯,还有很多其他选择可供尝试。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值