How to get text files can be bookmarked, and can save a bookmark?

How to get text files can be bookmarked, and can save a bookmark?

problem:

  We are on a blog comes in: to say to take notes, or text file lightest. Text files can have a problem, pure overdone, there are many features of wood. If the following three functions, text files that used to take notes is quite good.

  • Foldable
  • Color can be added
  • Bookmarks can be added

solve:

  Here to solve the bookmark function. Notepad ++ (hereinafter referred to as Np), itself marked with the bookmark function, but also very easy to use.

img

  But when the files are large, for example, there are thousands of lines, some of these features on the weak. Fortunately, there are plug-ins can enhance these functions.

  Bookmark text file is not saved. Ta saved because I do not know where to go. Text files are plain text files, unlike the super- text file, in the middle you can add a lot of things. Fortunately, we can in a text file inside, add some content to play a saved bookmark function. This is the second plug-in can be done.

The first plug-in

  The first plug-in, is a visual bookmark management tool, called Bookmarks List .

Bookmarks list
Author: Dook
Homepage: https://github.com/Dook1/Bookmarks-Dook/issues

img

  Plugin Manager to the "available" is selected, and then automatically install.

  After installing, open the small window.

img

  When the mouse line number window click bookmarking delete a bookmark, a small window will be a corresponding response, immediate response. Click a row in a small window, you can jump to a bookmark where the corresponding row, very easy to use.

  In short, it is to visualize the location of the bookmark. For the management of long documents, Jump will be very convenient.

  But these bookmarks, and then open after closing the file, run the light. How to save a bookmark, a look at the next plug.

The second plug-in

  第二个插件叫:Task List

Automatically scans the open document and adds all "TODO:*" items to your task list, a window pane docked on the right. Double-clicking an item in the list will take you to that line in the code.
Author: blitowitz
Homepage: https://code.google.com/p/npp-task-list/

  翻译一下上面的简短说明:

  自动扫描打开的文档,并添加所有的相应条目进你的右边的小窗口。双击条目就可以自动定位到代码相应的地方。

  也是自动安装即可。

img

  这个我摸索了好久,开始的时候,始终出不来。后面总算是出来了。摸索的过程:

++终于试出来了。无论是什么文件,只要内容中有:
TODO:...的内容,那么就会被收集到Task List中——其实就是TODO List。
要被收集,注意两点:
1、TODO之前必须是分隔符,之后必须是:,不是全角的:。
2、TODO四个字符,必须全部是大写的。
简单说,"TODO:",这是个整体。前面是分隔符,后面一直到行尾。
test:
TODO: 这个会被收集。
这个也会被收集: TODO: 注意T前面有个空格,O后面有没有空格都行。
++这样就解决了书签可以保存的问题了。

  小窗口中的内容,不会根据主窗口中的内容即时更新。要切换文件书签,才会更新。双击右边,就会定位左边。

img

  网上查了一下,原来TODO本来是用于调试程序的。比如有一段程序不是很理想,领导就会TODO一下,留下批语:

TODO:这段程序估计要执行一万年,明天给我重写好!

  那领导为什么不留下注释呢?因为程序中到处是注释,留下注释就不明显了。留下TODO才能留下重点。然后专门有程序来定位TODO的。

  本插件利用了TODO的功能来替代书签定位。好处是可保存,坏处是要改写文件内容。不过,改写也比较值:只要多留下五个字符TODO:

说明:

  中文显示问题。为了能在小窗口中,正确显示中文:

  • With Bookmarks list , you should use UTF-8coding.
  • With Task List time, use ANSIcode.

  Otherwise, it will be garbled. Very interesting question. Of course, the display English letters and numbers will not matter. It seems also learn much more than birds with ah.

20.03.03

Guess you like

Origin www.cnblogs.com/xin04/p/12404149.html