1. Tex

1.1 Texlive

https://www.tug.org/texlive/

1.2 CTAN

https://www.ctan.org

2. Sublime

2.1 Install

https://www.sublimetext.com/3
Backup: https://drive.google.com/open?id=0B7ciOrhoI8vkOEZqOXNBWnNrbzg

2.2 Package Control

https://packagecontrol.io/installation

import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; 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)

2.3 SublimeCodeIntel

https://github.com/SublimeCodeIntel/SublimeCodeIntel

2.4 ConvertToUTF8

https://github.com/seanliang/ConvertToUTF8

2.5 Latexing

http://www.latexing.com
Change setting:

{
    "username": "",
    "license": "",

    "log": false,

    "quick_build": [
        {
            "name": "Primary Quick Build: pdflatex",
            "primary": true,
            "cmds": ["pdflatex"]
            //"cmds": ["xelatex"]             // Change by hypocrisy on 2017.07.15
        },
        {
            "name": "Quick Build 1: pdflatex + bibtex + pdflatex (2x)",
            "cmds": ["pdflatex", "bibtex", "pdflatex", "pdflatex"]
        },
        {
            "name": "Quick Build 2: pdflatex + biber + pdflatex (2x)",
            "cmds": ["pdflatex", "biber", "pdflatex", "pdflatex"]
        },
        {                                         // Add by Hypocrisy on 2017.07.15
            "name": "Quick Build 3: xelatex",
            "cmds": ["xelatex"]
        },
        {                                         // Add by Hypocrisy on 2017.07.15
            "name": "Quick Build 4: xelatex + bibtex + xelatex (2x)",
            "cmds": ["xelatex", "bibtex", "xelatex", "xelatex"]
        }
    ],

    "fallback_encoding": "utf_8",


    // Changed by Hypocrisy on 2017.07.15
    "path": ["D:\\Program Files\\Sublime Text 3","D:\\Programs\\texlive\\tlpkg\\tlperl\\bin","D:\\Programs\\texlive\\bin\\win32","C:\\Program Files\\Microsoft\\R Client\\R_SERVER\\bin"],


    "show_log_panel_on": ["errors", "warnings", "badboxes", "infos"],

    "keep_focus": true,
    "keep_focus_delay": 0.2,


    "executables": {
        // Required
        "perl": ["perl"],
        "latexmk": ["latexmk"],
        // Optional
        "pdflatex": ["pdflatex"],
        "xelatex": ["xelatex"],
        "lualatex": ["lualatex"],
        "biber": ["biber"],
        "bibtex": ["bibtex"],
        "sublime": ["subl", "sublime_text", "sublime_text.exe"],
        "kpsewhich": ["kpsewhich"],
        "mthelp": ["mthelp"],
        "texcount": ["texcount"],
        "texdoc": ["texdoc"],
        "rscript": ["Rscript", "Rscript.exe"]
    },


    "forward_sync": true,
    "reverse_sync": true,


    "pdf_viewer_osx": {
        "skim": [
            "/Applications/Skim.app"
        ],
        "preview": [
            "/Applications/Preview.app"
        ]
    },

    "pdf_viewer_windows": {
        "foxit_reader": [
            "D:\\Program Files (x86)\\Foxit Software\\Foxit PhantomPDF\\FoxitPhantomPDF.exe"   // Changed by Hypocrisy on 2017.07.15
        ],
        "sumatra_pdf": [
            "D:\\Program Files\\SumatraPDF\\SumatraPDF.exe"         // Changed by Hypocrisy on 2017.07.15
        ]
    },

    "pdf_viewer_linux": {
        "evince": [
            "/usr/bin/evince"
        ],
        "okular": [
            "/usr/bin/okular"
        ]
    },

    "pdf_viewer_order" : [
        // OSX
        "skim",
        "preview",
        // Windows
        "sumatra_pdf",
        "adobe_reader",
        "foxit_reader",
        "pdf_xchange_viewer",
        // Linux
        "evince",
        "okular"
    ],


    "phrases": false,
    "phrases_mode": 0,
    "phrases_min_count": 2,
    "phrases_min_length": 3,
    "phrases_max_length": 5,
    "phrases_bounding_words": [],


    "partial_build": false,


    "open_pdf_on_load": true,

    "typeset_on_save": false,
    "type_scrolling": false,


    "output_directory": true,           // Change by Hypocrisy on 2017/07/15
    "output_directory_mode": 0,


    "default_tex_extension": ".tex",
    "default_bib_extension": ".bib",

    "check_source": ["local_bibliography", "remote_bibliography"],

    "tex_pattern": ["*.tex", "*.ltx", "*.tikz"],


    "graphics_pattern": ["*.jpeg", "*.jpg", "*.png", "*.eps", "*.pdf"],
    "currfile_graphicspath": false,

    "auto_trigger_fill": true,


    "cite_panel_format": ["#{key}: {title}", "{type} ({origin}) by {author}"],


    "label_format": "{type}:{prefix}:{name}",
    "label_type": {
        "table": "tbl",
        "figure": "fig",
        "part": "prt",
        "chapter": "cha",
        "section": "sec",
        "subsection": "ssec",
        "subsubsection": "sssec",
        "paragraph": "par",
        "subparagraph": "spar"
    },


    "foldable_environments": ["table", "figure", "equation"],

    "static_cwl": ["tex.cwl", "latex-209.cwl", "latex-dev.cwl", "latex-document.cwl", "latex-l2tabu.cwl", "latex-mathsymbols.cwl"],
    "dynamic_cwl": true,


    "build_arguments": [],

    "symbols_in_category": true,

    "cache": {
        "pkg": 168,
        "doc": 168,
        "tex": 24,
        "bib": 24,
        "bibsonomy": 48,
        "citeulike": 48,
        "global_bib": 48,
        "mendeley": 48,
        "zotero": 48
    },

    "remote_bibliography_in_category": false,

    "bibname": "Remote.bib",

    "update_remote_bibliography": true,

    "cite_key_blacklist": ["the", "a", "an", "der", "die", "das"],

    "bibsonomy": false,
    "bibsonomy_username": "",
    "bibsonomy_apikey": "",
    "bibsonomy_internal_cite_key": false,
    "bibsonomy_cite_key_pattern": "{Author}{Year}{Title}",

    "citeulike": false,
    "citeulike_username": "",
    "citeulike_internal_cite_key": false,
    "citeulike_cite_key_pattern": "{Author}{Year}{Title}",

    "global_bib_file": false,
    "global_bib_file_path": "",

    "mendeley": false,
    "mendeley_oauth_token": "",
    "mendeley_oauth_token_secret": "",
    "mendeley_internal_cite_key": false,
    "mendeley_cite_key_pattern": "{Author}{Year}{Title}",


    "zotero": false,
    "zotero_user_id": "",
    "zotero_user_key": "",
    "zotero_cite_key_pattern": "{Author}{Year}{Title}",

    "online_lookup": [
        {
            "title": "Dict.cc",
            "url": "http://www.dict.cc/?s={query}"
        },
        {
            "title": "Dict.leo.org",
            "url": "http://dict.leo.org/ende/#/search={query}"
        },
        {
            "title": "Dictionary.com",
            "url": "http://dictionary.reference.com/browse/{query}"
        },
        {
            "title": "Linguee.com EN-DE",
            "url": "http://www.linguee.com/english-german/search?query={query}"
        },
        {
            "title": "Linguee.de DE-EN",
            "url": "http://www.linguee.de/deutsch-englisch/search?query={query}"
        },
        {
            "title": "Pons.eu",
            "url": "http://en.pons.eu/dict/search/results/?q={query}&l=deen"
        },
        {
            "title": "Thesaurus.com",
            "url": "http://thesaurus.com/browse/{query}"
        }
    ],

    "knitr": false,

    "tikz": false,
    "tikz_create_pdf": false
}

2.6 LaTeX-cwl

https://github.com/LaTeXing/LaTeX-cwl

2.7 Pandoc

Pandoc: http://pandoc.org/installing.html
Sublime-Pandoc: https://github.com/tbfisher/sublimetext-Pandoc

{
  "default": {
    "pandoc-path": "D:/Programs/Pandoc/pandoc.exe",       // Add by Hypocrisy on 2017/07/14
    // transformations
    "transformations": {
      "Markdown (Pandoc)": {
        "new-buffer": 1,
        "scope": {
          "text.html": "html"
        },
        "syntax_file": "Packages/Markdown/Markdown.tmLanguage",
        "pandoc-arguments": [
          "--to=markdown",
          "--wrap=none",
          "--atx-headers"
        ]
      },

      "HTML 5": {
        "new-buffer": 1,
        "scope": {
          "text.html.markdown": "markdown"
        },
        "syntax_file": "Packages/HTML/HTML.tmLanguage",
        "pandoc-arguments": [
          "--to=html5",
          "--no-highlight"
        ]
      },

      "PDF": {
        "scope": {
          "text.html": "html",
          "text.html.markdown": "markdown",
          //"text.tex.latex": "latex",          // Add by Hypocrisy on 2017/07/14
        },
        "pandoc-arguments": [
          "-t", "pdf",
          //"--latex-engine=D:/Programs/texlive/bin/win32/xelatex.exe"
          // use --latex-engine=engine where engine is
          // pdflatex|lualatex|xelatex. This may need to be specified with a full path
          // if -o or --output missing, will write to a temporary file
          // "--output=~/Downloads/output.pdf"
        ]
      },

      "Microsoft Word": {
        "scope": {
          "text.html": "html",
          "text.html.markdown": "markdown",
          "text.tex.latex": "latex",          // Add by Hypocrisy on 2017/07/14
        },
        "pandoc-arguments": [
          "-t", "docx",
          //"--latex-engine=D:/Programs/texlive/bin/win32/xelatex.exe",     // Add by Hypocrisy on 2017/07/14
          "--output=./Output/output.docx"            // Add by Hypocrisy on 2017/07/14
        ]
      },

      "PDF TOC (Narrow margins)": {
        "scope": {
          "text.html": "html",
          "text.html.markdown": "markdown",
          },
        "pandoc-arguments": [
          "-V", "geometry:margin=1.25in", 
          "-s", "--toc", "--number-sections", "--parse-raw",
          "-t", "pdf",
        ],
      },

      "PDF TOC": {
        "scope": {
          "text.html": "html",
          "text.html.markdown": "markdown",
          },
        "pandoc-arguments": [
          "-s", "--toc", "--number-sections", "--parse-raw",
          "-t", "pdf",
         ],
      },

      "HTML TOC": {
        "new-buffer": 1,
        "scope": {
          "text.html.markdown": "markdown"
        },
        "syntax_file": "Packages/HTML/HTML.tmLanguage",
        "pandoc-arguments": [
          "--to=html5",
          "--no-highlight",
          "-s", "--toc"
        ]
      },

      "Beamer Slides (PDF)": {
        "scope": {
          "text.html": "html",
          "text.html.markdown": "markdown",
        },
        // Use the "out-ext" parameter to define a custom output file extension. Commonly used for pdf.
        "out-ext": "pdf",
        "pandoc-arguments": [
          "-t", "beamer",
          "--latex-engine=D:/Programs/texlive/bin/win32/pdflatex.exe"
        ]
      },

      "Beamer Slides (LaTeX)": {
        "scope": {
          "text.html": "html",
          "text.html.markdown": "markdown",
        },
        "pandoc-arguments": [
          "-t", "beamer",
        ]
      },
      
      "s5 Slides": {
        "scope": {
          "text.html": "html",
          "text.html.markdown": "markdown",
        },
        "pandoc-arguments": [
          "-t", "slidy", "-s", "--self-contained",
        ]
      },
    },
    // these should not need to be customized

    // output formats that are written to file, using -o parameter. These we do
    // not output to a sublime text buffer.
    "pandoc-format-file": ["docx", "epub", "pdf", "odt", "beamer"]
  }
}

3. Vim

3.1 Install

Recommend vim 8.

apt install python3-dev
git clone https://github.com/vim/vim.git
cd vim
# configure with python support
./configure --enable-python3interp=yes \
            --with-python3-config-dir=/usr/lib/python3.5/<config-dir>  # <config-dir> varies in different system, I used 'config-3.5m-x86_64-linux-gnu'.
make install

3.2 Install plugins

mkdir -p ~/.vim/pack/yuzhen-plugins/start/
cd ~/.vim/pack/yuzhen-plugins/start
git clone https://github.com/scrooloose/nerdtree.git
git clone https://github.com/fholgado/minibufexpl.vim.git
git clone https://github.com/mattn/emmet-vim.git
apt install exuberant-ctags
git clone https://github.com/majutsushi/tagbar.git
git clone https://github.com/SirVer/ultisnips.git     # Need python support
git clone https://github.com/honza/vim-snippets.git
## YouCompleteMe
git clone https://github.com/Valloric/YouCompleteMe.git
git submodule update --init --recursive
# Method 1(Recommend)
python3 install.py
# End of Method 1
# Method 2
mkdir ~/.ycm_build
cd ~/.ycm_build
apt install cmake
cmake -G "Unix Makefiles" . ~/.vim/pack/yuzhen-plugins/start/YouCompleteMe/third_party/ycmd/cpp
cmake --build . --target ycm_core --config Release
# End of Method 2
# Add Javascript Support
cd ~/.vim/pack/yuzhen-plugins/start/YouCompleteMe/third_party/ycmd/third_party/tern_runtime
yarn install --production     # or 'yarn global add install --production'
# End of Javascript Support

3.3 Configuration

Git仓库获得/etc/vim/vimrc;/etc/vim/vimrc.local;/etc/vim/vimrc.tiny内容

3.4 Some problems

If you have added set encoding=utf-8, but there is still ycm error, you can excute:

export LC_ALL=en_US.utf-8 
export LANG="$LC_ALL"

If vim cannot find vimrc, you can excute:

export VIMINIT='source $MYVIMRC'
export MYVIMRC='/etc/vim/vimrc'

4. Git

git config --global core.editor "vim"

5. Valgrind