Difference between revisions of "Sublime Notes"

From Aicip
Jump to: navigation, search
(Use spaces (globally))
(Project Management)
 
Line 124: Line 124:
  
 
= Project Management =
 
= Project Management =
 
+
{| class="wikitable"
Ctrl == ^
+
!Command
 
+
!Notes
Cmd + ^ + p   switch between project
+
|-
 
+
|<code>Cmd + ^ + p</code>
Cmd + b   compile
+
|switch between project
 
+
|-
Cmd + ^ + q format paragraph
+
|<code>Cmd + b</code>
 
+
|compile
Cmd + l v display PDF
+
|-
 +
|<code>Cmd + l v</code>
 +
|display PDF
 +
|}
  
 
= Using LuaLatex =
 
= Using LuaLatex =

Latest revision as of 00:48, 16 December 2015

Installation

http://www.sublimetext.com/3

and install Skim PDF viewer

Sublime API and Document

https://www.sublimetext.com/docs/2/

Package control

https://packagecontrol.io/

https://github.com/randy3k/AutoWrap

https://github.com/ehuss/Sublime-Wrap-Plus

Auto Wrap

Preference/Settings - More/Syntax specific

This open up LaTeX.sublime-settings

{
"auto_wrap" : true,
"auto_wrap_width" : 78
}

Spell Check

Preference/Settings - More/Syntax specific

This open up LaTeX.sublime-settings

{ "auto_wrap" : true,
  "auto_wrap_width" : 78,
  // Set to true to turn spell checking on by default
  "spell_check": true
}

Wrap Plus Key Binding

Preferences/Key Bindings - Users

[
  {"keys": ["super+alt+q"], "command": "wrap_lines_plus", "args": {"width": 78}}
]

Of course, we could use a different key combination.

For a list of how key are defined, you can open Preferences/Key Binding (Default)

Customize font

https://www.sublimetext.com/docs/2/font.html


Preference/Settings/Users or Cmd + ,

# Preferences.sublime-settings
{
	"ignored_packages":
	[
		"Vintage"
	], 

	"font_face": "Menlo",
	"font_size": 14

}

Vim Mode

https://www.sublimetext.com/docs/2/vintage.html

Latex Support

https://github.com/SublimeText/LaTeXTools

First of all, we need to define the following line for each sub file.

%!TEX root = yourmasterfile.tex

A few commonly used commands

Control Command Notes
C-l j Display PDF from where the current cursor is
C-l ts Toggle PDF syncing

Use spaces (globally)

Preferences/Settings/Default

"tab_size": 4,
// Set to true to insert spaces when tab is pressed
"translate_tabs_to_spaces": true,

Color Themes

First, install “ColorSublime”

Option 1: Pastels on Dark

Option 2: Sunburst/Twilight (both theme are kinda similar)

Option 3: Active4D

The path for installing new color theme packages are:

You can download color theme at:

http://colorsublime.com/

Project Management

Command Notes
Cmd + ^ + p switch between project
Cmd + b compile
Cmd + l v display PDF

Using LuaLatex

Preference/Package Settings/LatexTools/Settings - Users/

"builder_settings" : {

// General settings:

// See README or third-party documentation

"program": "lualatex",

New Build Command

Note that this is how you can put multiple command on Mac OS X

{

   "cmd": [

   "sh", "-c", "cmake . && make"

   ]

}

Fine tune word wrap

http://stackoverflow.com/questions/13416724/in-sublime-text-2-consider-hyphen-as-part-of-word

Preference/Settings/Syntax specific, this doesn’t seem work.

I have to go with Setting - Users for some reason

I got rid of {} [] -

I consider this as whole word things.

   // Characters that are considered to separate words

   "word_separators": "./\\()\"',.;<>~!@#$%^&*|+=`~?"