In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Downloaded the source code package, need to browse. Window systems usually use SourceInsight, but I use linux mint systems. After messing with wine for a period of time, the effect is not good. Later, someone said that sublime could be used. I tried it, and it worked well.
1. Sublime, open the folder
The source package generally has a lot of files, it is best to open the folder to browse. Open the folder using the menu File-> Open Folder. It can also be done on the command line. As follows:
Sublime-text folder
My own sublime is downloaded from the official website and placed in the / opt directory, so I can't use the command directly. The alias command is later used to make sublime effective. This is much more convenient than using links. For alias to persist, it must be placed in a .bashrc or similar file in order to boot. It is suggested that alias-related commands be placed in a special .bash _ aliases file. That's what I did. After editing and saving the file, it will be loaded automatically the next time you boot. To take effect immediately, execute:
Source .bash _ aliases
2. Sublime uses ctags
Sublime can't jump like the powerful IDE. You can install the ctags plug-in to achieve similar functionality. This is very necessary. Otherwise, it will be extremely troublesome to manually search for definitions in a large number of files. Online introduction to the method of installing ctags is generally recommended to install the plug-in Package Control first, making it more convenient to install the plug-in. I originally wanted to try to install directly, so I went to github to search for ctags, and I saw on the github.com/SublimeText/Ctags page that sublime officially recommended package control to install ctags. Install package control. I found its website: https://packagecontrol.io. There is an Installation on the right, and when you click on it, you will see the installation prompt. There are not too many introductions here. It is important to note that the version of sublime, version 2 and version 3 installation use different packages or commands. How do I view the sublime version? You can click the menu Help-> About Sublime Text, and the bottom line has the words Stable Channel, Build xxxx. Xxxx is a number, mine is Build 3083, and the first number 3 indicates version 3. I rebooted twice when I installed sublime, because I didn't take a closer look at it when I said I wanted to install a dependency.
It is much more convenient to install the plug-in after installing package control. Using the shortcut key Ctrl + Shift + P to exhale the Pacage Control panel, you can see quite a number of options that can be clicked to perform an action. Enter install, which filters all options and lists items that contain install. We find Package Control: Install Package and click. The first execution downloads the data. After the download is complete, all installable plug-ins are listed. Still enter ctags, which will filter the list of plug-ins, find the correct one and click to download the installation automatically. It can be used without restarting after installation.
Use the shortcut keys: Ctrl + t, Ctrl + r (note that you press two keys in a row, not once) to create a label file for later browsing. The result indicates "/ bin/sh: 1: ctags: not found". Apparently no ctags command was found. It seems that the plug-in for sublime just calls the ctags command, not implements it yourself. It seems that ctags will also be installed. However, this is very easy, you can install it with apt.
There is no need to restart after the installation is completed, press the shortcut key again, and you can see that there are two more files in the list of files on the left, namely .tags and .tags _ sorted_by_files. These are two hidden files. Then came the use of ctags. You can use menus or shortcut keys. Originally, I wanted to write down the shortcut keys for reference, but later I found that there were shortcut keys written next to the menu items, so there was really no need to record them.
3. Open in read-only mode
Browsing code is different from editing, and you obviously don't want to modify it. But sometimes I can't shake my hands. If only I could open it as read-only. I searched the Internet and got no results. Some people say that sublime's vim mode can be enabled. I didn't look at it carefully, thinking that since the source code is not modified, it would be better to make the whole thing read-only. Later, I thought, no, the two files generated by ctags have to be read and written. So I went back to study the vim model. I saw that someone said that it was actually vi mode (yes, you can check the official document: http://feliving.github.io/Sublime-Text-3-Documentation/vintage.html. Why emphasize it? Because there are still many differences between vi and vim. Others say that sublime 3 does not support it (it does). How do I enable it? Some people say that deleting the Vintage of the ignore_packages of the default profile is a bit like adding an ignore_packages entry to the user profile, whose value is empty. Then I saw a comment that lit up in front of me: using Package Control's Enable Package and Disable Package functions. I tried it right away, and it worked. The plug-in-enabled feature is used here, so enter enable filter, click the option, and you can see all the disabled plug-ins. Click Vintage to re-enable it. When you enter edit mode, press Esc to enter command mode. Add this line to the user profile: "vintage_start_in_command_mode": true, and you can start and enter command mode.
Of course, it's not safe, because there are quite a few commands in vi command mode that modify the code.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.