美文网首页
Atom Editor

Atom Editor

作者: 艺术叔 | 来源:发表于2017-09-23 09:56 被阅读0次

    remote-sync

    远程同步文件夹/文件, 适合远程调试, 不需要本地改完后手动上传
    使用scp/sftp, ftp协议(一般使用sftp)
    首先安装remote-sync, 然后重启Atom
    toggle remote sync: configure


    设置传输协议:
    设置需要同步的文件:

    这样每次修改后保存会自动显示同步信息:

    atom + Latex

    linux

    packages:

    • LaTeX-autocomplete
    • pdf-view
    • latex
    • Latextools: smart quote $

    tex:
    TexLive
    下载包后安装


    latex package setting:
    设置tex路径:
    /usr/local/texlive/2017/bin/x86_64-linux
    设置pdf预览:

    设置引擎:

    注意: 如果要显式中文的话, 这里建议用xelatex, 加上\usepackage{ctex} . 试了使用pdflatex不行
    \documentclass[UTF8]{article}
    \author {Author}
    \title {Title}
    \usepackage{ctex} #使用xelatex
    \usepackage{amsmath}
    \usepackage{amssymb}
    
    \begin{document}
    \maketitle
    \section{First section} test1.
        \subsection{First subsection} test2.
            \subsubsection{First double subsection}
                \paragraph{Fist paragraph} test3.
                    \subparagraph{First subparagraph} test4.
        \subsection{Second subsection}
            \paragraph{段落} 中文测试。
    \\
    Hello World! \\ % This is comment
    Hello \LaTeX ! \\
    
    $\lim\limits_{n \rightarrow +\infty} P\lbrace\frac{\sum\limits_{i=1}{n}Xi - n\cdot EX}{ \sqrt{n \cdot DX} }  \leqslant x\rbrace = \Phi(x)$ \\
    
    $P\lbrace a<X<b \rbrace \approx \Phi(\frac{b - n\cdot EX}{\sqrt {n\cdot DX}}) - \Phi(\frac{a - n\cdot EX}{\sqrt{n\cdot DX} })$ \\
    
    $F(x,y) = F_{X}(x)F_{Y}(y)$
    \end{document}
    

    安装latex-autocomplete. 使用:例如在希望补全\equation时, 不需要输入\, 直接输入equation就可以.

    snippets

    一种自定义的autocomplete.


    或者:
    First, open your snippets file. I Use cmd-shift-p to search all actions and then type snippets and then select Application: Open Your Snippets to open the snippets file.
    例如:
    '.text.md':
      'Hello World':
        'prefix': 'hewo'
        'body': 'Hello World!'
    
      'Github Hello':
        'prefix': 'gihe'
        'body': 'Octocat says Hi!'
    
      'Octocat Image Link':
        'prefix': 'octopic'
        'body': '![GitHub Octocat](https://img.haomeiwen.com/i3444195/8f0e3475bf954965.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)'
    

    Atom snippets allow you to enter a simple prefix in the editor and hit tab to expand the prefix into a larger code block with templated values.

    选择

    Ctrl+Up/Down - Move the current line up or down
    Ctrl+Shift+D - Duplicate the current line

    使用

    命令窗口If you press Ctrl+Shift+P while focused in an editor pane, the command palette will pop up.
    快捷键
    快捷键有两种形式两种:一种是同时按下的、另一种是顺序按下的。

    • ctrl + L
      全选当前行
      多次点击选择多行
    • ctrl + +\-
      放缩当前页面
    • Ctrl + \
      隐藏/展示左边的目录树
    • ctrl + shift + p
      Command
    • Ctrl+TorCtrl+P
      文件模糊搜索
    • ctrl + shift + a
      打开目录
    • Alt+F3
      全局修改 Select all words in the document that are the same as the currently selected word

    查找与替换

    atom的查找模式

    左一为正则表达式模式,非常常用。

    打开文件

    When you open a new file by single-clicking in the Tree View, it will open in a new tab with an italic title. This indicates that the file is "pending". When a file is pending, it will be replaced by the next pending file that is opened. This allows you to click through a bunch of files to find something without having to go back and close them all.

    单击文件是加载,用斜体的标题表示,这样文件不是真正打开,会被后面的加载覆盖,这一特性适合查看文件。

    配置

    在windows上设置


    windoes上防火墙问题
    需要设置ssl. 参考[官方文档](http://flight-manual.atom.io/getting-started/sections/installing-atom/)
    apm config set strict-ssl false
    
    在PowerShell上设置

    下载latex engine的发行版之一——MikTex


    点击‘Start Package Manager’

    选择latexmk,点击'+'进行下载

    在win上若出现缺少c/c++编译器的情况,可以下载一个小的c++编辑器,比如Dev C++.

    packages 配置

    • markdown-preview-plus
      • preview字体设置
        ctrl+shift+p搜索stylesheet

    打开文件,在最后一行加上

    div.update-preview {
      font-size:28px;
    }
    

    keybinding

    多个包的keybinding会出现冲突, 往往是新来的覆盖以前的. 这时我们需要手动确定到底希望keybinding触发的是哪一个命令.首先打开keybinding, 看那些keybinding冲突了. 打开希望的那个keybinding文件, 找到keybinding的定义,然后打开自定义keybinding文件进行编辑(在edit>keymapping中打开):


    "atom-text-editor[data-grammar~=\"latex\"]":
      "ctrl-alt-b": "latex:build",
      "ctrl-alt-s": "latex:sync",
      "ctrl-alt-c": "latex:clean"
    

    保存

    相关文章

      网友评论

          本文标题:Atom Editor

          本文链接:https://www.haomeiwen.com/subject/pcdzzttx.html