Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Ubuntu 14.04 install Sublime Text 3 plug and use SublimeClang     - Diagnose and resolve the SSH connection slow (Linux)

- Efficient running Linux virtual machine Six Tips (Linux)

- ARM Linux system call (Linux)

- Broadcom transplanted to OpenWrt summary (Programming)

- Use Mop monitor stock prices at the Linux command line (Linux)

- 64-bit Windows Server 2012 R2 install Oracle 10g Second Edition (Database)

- Zypper command for SUSE Linux package management (Linux)

- Forwarding module with Apache reverse proxy server (Server)

- Xmanager Remote Desktop connection CentOS (Linux)

- Build your own CA services: OpenSSL command line CA Quick Guide (Server)

- Deploy OpenStack Juno on Ubuntu 14.04 (Linux)

- Why is the ibdata1 file growing in MySQL? (Database)

- Error: Unable to establish connection with FTP SFTP server (Server)

- Installation and use the telnet command under CentOS 6.x (Linux)

- The most commonly used Linux commands (Linux)

- YUM install desktop environment in CentOS (Linux)

- Let 32 Linux / CentOS system to support more than 4G memory (Linux)

- Oracle database online redo logs are several methods of recovery of deleted (Database)

- How to migrate MySQL to MariaDB under linux (Database)

- Cobbler batch install Ubuntu / CentOS system (Linux)

 
         
  Ubuntu 14.04 install Sublime Text 3 plug and use SublimeClang
     
  Add Date : 2018-11-21      
         
         
         
  Sublime Text is a cross-platform editor that supports Windows, Linux, Mac platform, support various language code editor, with the corresponding plug-in point of time to learn the words, you will love it, greatly improve your coding efficiency. This article will explain the installation SublimeText 3 in Ubuntu 14.04 system, and configure the plug-in to configure SublimeClang C / C ++ development environment.

1. Sublime Text 3 download and install
  To download on the official website http://www.sublimetext.com/3 64 (64-bit systems) the .deb package (http://c758482.r82.cf2.rackcdn.com/sublime-text_build-3059_amd64. deb), double-click to install after downloading. Once installed, you can open the program from the command subl, then you can already write code.

2. Install Package Control

Package Control is a good tool for managing widget can be used to install, remove, disable the corresponding plug-ins, plug-ins can be commonly found in the above. Its source address on https://github.com/wbond/package_control_channel, installation is very easy to use git down to clone the code first, then copy it to ~ / .config / sublime-text-3 / Packages / directory and was named Package Control can. (You can also download the package directly on github, and then extract copied to the ~ / .config / sublime-text-3 / Packages / directory named Package Control).

cd ~ / .config / sublime-text-3 / Packages /

git clone https://github.com/wbond/package_control_channel.git Package \ Control

Or open sublime_text then press the shortcut keys ctrl + `(Esc below the key), the pop-up window, enter the following command input information to Enter:

import urllib.request, os, hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path (); urllib.request.install_opener (urllib.request.build_opener ( urllib.request.ProxyHandler ())); by = urllib.request.urlopen ( 'http://packagecontrol.io/' + pf.replace ( '', '% 20')) read ();. dh = hashlib .sha256 (by) .hexdigest ();! print ( 'Error validating download (got% s instead of% s), please try manual install'% (dh, h)) if dh = h else open (os.path. join (ipp, pf), 'wb') .write (by)


Restart SublimeText 3, and then use the keyboard shortcut Ctrl + Shift + p, in the pop-up Package Control input box you can see the Install Package option, select it after a while (see lower left) will pop up plug-in queries and installation window, enter want to use the plug-in, select enter. If for C / C ++ developers recommend installing C ++ snipptes, ConvertToUTF8, SublimeAStyleFormatter plug, specifically what does it mean baidu look clear.

3. Install a powerful plug SublimeClang
SublimeClang Sublime Text is the only C / C ++ plug-in auto-complete, powerful, comes grammar checkers, but recently the author has stopped updating, and now can only be found in Sublime Text Package Control 2 and the automatic installation, SublimeText 3 can only be installed manually by the source, its code in line https://github.com/quarnster/SublimeClang. Specific steps are as follows:

Install software
    sudo apt-get install cmake build-essential clang git
    cd ~ / .config / sublime-text-3 / Packages
    git clone --recursive https://github.com/quarnster/SublimeClang SublimeClang
    cd SublimeClang
    cp /usr/lib/x86_64-linux-gnu/libclang-3.4.so.1 internals / libclang.so # This step is very important, if your library is not clang 3.4 version, please copy the corresponding version of the library to the internals of the
    cd src
    mkdir build
    cd build
    cmake ..
    make

All successful will generate libcache.so library file SublimeClang / internals directory. Restart Sublime Text, and then press the shortcut keys Ctrl + `(Esc below that key) to open the control output comes to see if there was anything wrong, if there are no errors on it all OK. The next step is to configure their own files, press ctrl + shift + p shortcuts, pop-up input box sublimeclang settings, and then select the User with the line, enter the following information in the open file:

{
    "Show_output_panel": false,
    "Dont_prepend_clang_includes": true,
    "Inhibit_sublime_completions": false,

    "Options":
    [
        "-std = Gnu ++ 11",
        "-isystem", "/ Usr / include",
        "-isystem", "/ Usr / include / c ++ / *",
        "-isystem", "/usr/include/c++/4.8",
        "-isystem", "/usr/include/c++/4.8/*",
        "-isystem", "/ Usr / include / boost",
        "-isystem", "/ Usr / include / boost / **",
        "-isystem", "/usr/lib/gcc/x86_64-linux-gnu/4.8/include",
        "-isystem", "/usr/lib/gcc/x86_64-linux-gnu/4.8/include/*"
    ]
}
NOTE: My gcc version 4.8, if you are not, please replace the corresponding version, save the current file after #include the appropriate header file, the next operation will be faster tips contained in the header file or function variable.

4. Projects
    Through Project in the menu bar -> Add Folder To Project ... your existing source code directory to Sublime Text, and then through the Project - to save your project> Save Project As ..., thus creating a good project. Such as my machine there is a C ++ project / media / WinE / WorkStation / Swift, the code respectively placed under swift / base and swift / disruptor two directories under the Swift, now we want to put the contents of two directories when writing code that can automatically prompt you need the appropriate configuration changes. Project -> Edit Project, in the configuration file open, I changed as follows:

{
    "Folders":
    [
        {
            "Follow_symlinks": true,
            "Path": "/ media / WinE / WorkStation / Swift"
        }
    ],

    "Settings":
    {
        "Sublimeclang_options":
        [
            "-I / Media / WinE / WorkStation / Swift",
            "-I / Media / WinE / WorkStation / Swift / swift / base",
            "-I / Media / WinE / WorkStation / Swift / swift / disruptor",
      ]
    }
}

     
         
         
         
  More:      
 
- CentOS ClamAV antivirus package updates (Linux)
- The text formatting tools awk Linux system (Linux)
- Node.js simple interface server (Server)
- How to create a secure and easy to remember password (Linux)
- Linux shell in back quotes (`) Application (Linux)
- numpy and SciPy installation under Python for scientific computing package (Linux)
- Linux MultiPath software implementation instructions (Linux)
- Netfilter / Iptables Comments (Linux)
- Ten SCP transfer command example (Linux)
- NIC configuration parameters under Linux (Linux)
- How to configure FirewallD in RHEL / CentOS 7 and Fedora in (Linux)
- Linux operating system Samba server configuration and use (Server)
- Use value type build better applications Swift (Programming)
- Scope of variables in C # (Programming)
- Do you know how to build the Linux kernel (Programming)
- CentOS 7 Configure logging (VirtualBox) (Linux)
- Debian (Wheezy) were installed wxPython GUI development (Linux)
- The method of Linux into the rescue mode (Linux)
- Linux account management add relevant directives (Linux)
- Ubuntu installed Komodo editor by PPA (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.