Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: docs/linux_sublime_dev.md

Issue 2017013002: Re-ordered Sublime Text documentation to move SublimeClang instructions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Linux Sublime Dev 1 # Linux Sublime Dev
2 2
3 Sublime Text is a fast, powerful and easily extensible code editor. Check out 3 Sublime Text is a fast, powerful and easily extensible code editor. Check out
4 some [visual demos](http://www.sublimetext.com) for a quick demonstration. 4 some [visual demos](http://www.sublimetext.com) for a quick demonstration.
5 5
6 You can download and install Sublime Text 3 from the [Sublime Text 6 You can download and install Sublime Text 3 from the [Sublime Text
7 Website](http://www.sublimetext.com/3). Assuming you have access to the right 7 Website](http://www.sublimetext.com/3). Assuming you have access to the right
8 repositories, you can also install Sublime via apt-get on Linux. Help and 8 repositories, you can also install Sublime via apt-get on Linux. Help and
9 general documentation is available in the [Sublime Text 3 9 general documentation is available in the [Sublime Text 3
10 Docs](http://www.sublimetext.com/docs/3/). 10 Docs](http://www.sublimetext.com/docs/3/).
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 ``` 306 ```
307 307
308 1. Restart Sublime. Now when you save a file, you should see a "Reparsing…" 308 1. Restart Sublime. Now when you save a file, you should see a "Reparsing…"
309 message in the footer and errors will show up in the output panel. Also, 309 message in the footer and errors will show up in the output panel. Also,
310 variables and function definitions should auto-complete as you type. 310 variables and function definitions should auto-complete as you type.
311 311
312 **Note:** If you're having issues, adding `"sublimeclang_debug_options": true` t o 312 **Note:** If you're having issues, adding `"sublimeclang_debug_options": true` t o
313 your settings file will print more to the console (accessed with ``Ctrl + ` ``) 313 your settings file will print more to the console (accessed with ``Ctrl + ` ``)
314 which can be helpful when debugging. 314 which can be helpful when debugging.
315 315
316 ### Mac (not working)
317
318 1. Install cmake if you don't already have it
319 1. Install XCode
320 1. Copy libclang.dylib from XCode to the SublimeClang/internals folder:
321
322 ```shell
323 cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
324 git clone --recursive https://github.com/quarnster/SublimeClang SublimeClang
325 cd SublimeClang
326 cp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctool chain/usr/lib/libclang.dylib internals/libclang.dylib
327 # Remove i386 from the build file since XCode's libclang.dylib is only a 64- bit version
328 sed -ie 's/CMAKE_OSX_ARCHITECTURES i386 x86_64/CMAKE_OSX_ARCHITECTURES x86_6 4/' src/CMakeLists.txt
329 # Copy libclang.dylib to the internals dir
330 # Make the project - should be really quick, since libclang.dylib is already built
331 cd src && mkdir build && cd build
332 cmake ..
333 make
334 ```
335
336 1. The rest of the instructions are the same, but when adding your project
337 settings, add these extra arguments to `sublimeclang_options`:
338
339 ```json
340 "sublimeclang_options":
341 [
342 ...
343 // MAC-ONLY: Include these options, replacing the paths with the correct i nstalled SDK
344 "-isystem", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.p latform/Developer/SDKs/MacOSX10.10.sdk/usr/include/",
345 "-isystem", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.p latform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1",
346 "-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/De veloper/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/",
347 "isysroot", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.p latform/Developer/SDKs/MacOSX10.10.sdk",
348 "-mmacosx-version-min=10.7",
349 "-stdlib=libc++",
350 "-isystem", "/usr/include",
351 "-isystem", "/usr/include/c++/*",
352 ]
353 ```
354
355 ### Windows (not working)
356
357 You'll need cl.exe which can be installed with [the Visual C++ Build Tools
358 2015](https://blogs.msdn.microsoft.com/vcblog/2016/03/31/announcing-the-official -release-of-the-visual-c-build-tools-2015/).
359 You should have cl.exe on your `$PATH`, which you can get by running `C:\Program
360 Files (x86)\Microsoft Visual C++ Build Tools\Visual C++ 2015 x64 Native Build
361 Tools Command Prompt`.
362
363 Then you'll need a copy of libclang.so, which can be found on the [LLVM
364 website](http://llvm.org/releases/download.html). The instructions should be the
365 same as Linux from there.
366
316 ## Alternative: Code Completion with Ctags 367 ## Alternative: Code Completion with Ctags
317 368
318 For a fast way to look up symbols, we recommend installing the CTags plugin. 369 For a fast way to look up symbols, we recommend installing the CTags plugin.
319 370
320 1. Install Exuberant Ctags and make sure that ctags is in your path: 371 1. Install Exuberant Ctags and make sure that ctags is in your path:
321 http://ctags.sourceforge.net/ (on linux you should be able to just do `sudo 372 http://ctags.sourceforge.net/ (on linux you should be able to just do `sudo
322 apt-get install ctags`) 373 apt-get install ctags`)
323 1. Install the Ctags plugin: `Ctrl + Shift + P > Install Package > Ctags` 374 1. Install the Ctags plugin: `Ctrl + Shift + P > Install Package > Ctags`
324 375
325 Once installed, you'll get an entry in the context menu when you right click the 376 Once installed, you'll get an entry in the context menu when you right click the
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 ```json 416 ```json
366 [ 417 [
367 { "keys": ["ctrl+f7"], "command": "compile_current_file", "args": {"target_bui ld": "Debug"} }, 418 { "keys": ["ctrl+f7"], "command": "compile_current_file", "args": {"target_bui ld": "Debug"} },
368 { "keys": ["ctrl+shift+f7"], "command": "compile_current_file", "args": {"targ et_build": "Release"} }, 419 { "keys": ["ctrl+shift+f7"], "command": "compile_current_file", "args": {"targ et_build": "Release"} },
369 ] 420 ]
370 ``` 421 ```
371 422
372 You can then press those key combinations to compile the current file in the 423 You can then press those key combinations to compile the current file in the
373 given target build. 424 given target build.
374 425
375 ### Mac (not working)
376
377 1. Install cmake if you don't already have it
378 1. Install XCode
379 1. Copy libclang.dylib from XCode to the SublimeClang/internals folder:
380
381 ```shell
382 cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
383 git clone --recursive https://github.com/quarnster/SublimeClang SublimeClang
384 cd SublimeClang
385 cp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctool chain/usr/lib/libclang.dylib internals/libclang.dylib
386 # Remove i386 from the build file since XCode's libclang.dylib is only a 64- bit version
387 sed -ie 's/CMAKE_OSX_ARCHITECTURES i386 x86_64/CMAKE_OSX_ARCHITECTURES x86_6 4/' src/CMakeLists.txt
388 # Copy libclang.dylib to the internals dir
389 # Make the project - should be really quick, since libclang.dylib is already built
390 cd src && mkdir build && cd build
391 cmake ..
392 make
393 ```
394
395 1. The rest of the instructions are the same, but when adding your project
396 settings, add these extra arguments to `sublimeclang_options`:
397
398 ```json
399 "sublimeclang_options":
400 [
401 ...
402 // MAC-ONLY: Include these options, replacing the paths with the correct i nstalled SDK
403 "-isystem", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.p latform/Developer/SDKs/MacOSX10.10.sdk/usr/include/",
404 "-isystem", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.p latform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1",
405 "-F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/De veloper/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/",
406 "isysroot", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.p latform/Developer/SDKs/MacOSX10.10.sdk",
407 "-mmacosx-version-min=10.7",
408 "-stdlib=libc++",
409 "-isystem", "/usr/include",
410 "-isystem", "/usr/include/c++/*",
411 ]
412 ```
413
414 ### Windows (not working)
415
416 You'll need cl.exe which can be installed with [the Visual C++ Build Tools
417 2015](https://blogs.msdn.microsoft.com/vcblog/2016/03/31/announcing-the-official -release-of-the-visual-c-build-tools-2015/).
418 You should have cl.exe on your `$PATH`, which you can get by running `C:\Program
419 Files (x86)\Microsoft Visual C++ Build Tools\Visual C++ 2015 x64 Native Build
420 Tools Command Prompt`.
421
422 Then you'll need a copy of libclang.so, which can be found on the [LLVM
423 website](http://llvm.org/releases/download.html). The instructions should be the
424 same as Linux from there.
425
426 ## Building inside Sublime 426 ## Building inside Sublime
427 427
428 To build inside Sublime Text, we first have to create a new build system. 428 To build inside Sublime Text, we first have to create a new build system.
429 429
430 You can add the build system to your project file (`Project > Edit Project`), 430 You can add the build system to your project file (`Project > Edit Project`),
431 replacing `out/Debug` with your output directory (on Windows, replace /'s with 431 replacing `out/Debug` with your output directory (on Windows, replace /'s with
432 \s in `cmd` and `working_dir`): 432 \s in `cmd` and `working_dir`):
433 433
434 ```json 434 ```json
435 { 435 {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 * [Case Conversion](https://packagecontrol.io/packages/Case%20Conversion) - 575 * [Case Conversion](https://packagecontrol.io/packages/Case%20Conversion) -
576 automatically changes the case of selected text, e.g. `kConstantName` to 576 automatically changes the case of selected text, e.g. `kConstantName` to
577 `CONSTANT_NAME` 577 `CONSTANT_NAME`
578 * [Text Pastry](https://packagecontrol.io/packages/Text%20Pastry) - 578 * [Text Pastry](https://packagecontrol.io/packages/Text%20Pastry) -
579 Inserts incremental number sequences with multi-select 579 Inserts incremental number sequences with multi-select
580 * [Wrap Plus](https://packagecontrol.io/packages/Wrap%20Plus) - Auto-wraps 580 * [Wrap Plus](https://packagecontrol.io/packages/Wrap%20Plus) - Auto-wraps
581 a comment block to 80 columns with `Alt + Q` (was used to write this 581 a comment block to 80 columns with `Alt + Q` (was used to write this
582 document! ;-) 582 document! ;-)
583 * [Diffy](https://packagecontrol.io/packages/Diffy) - With two files 583 * [Diffy](https://packagecontrol.io/packages/Diffy) - With two files
584 opened side-by-side, `Ctrl + k Ctrl + d` will show the differences 584 opened side-by-side, `Ctrl + k Ctrl + d` will show the differences
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698