op-nhom1demo package
Supported snippet languages: HTML, CSS, Javascript
How to use "snippet":
- Go to
test.js
file - Do one of the following:
- Type one of the
case
in switch-case trong filemain.js
, select word, open command palette, pressOp Nhom1demo : Expand
to insert snippet - Type one of following
prefix
snippet insnippet.cson
on test file, then select the word, pressCtrl+Tab
- Press
~
to open the modal panel and click to the snippet panel to insert snippet in current cursor position - Go to Packages > op-nhom1demo > using the options same as step 2.1 and 2.2
- Snippet appears!
Edit and run instruction:
- It's recommended to uninstall this package first before making any edit.
- Clone this repository
git clone https://github.com/AcezukyRockon/op-nhom1demo.git
atC:\Users\<username>\.atom\packages
- Reload Atom.
- Make some edits
- Reload Atom by open "Command Palette" (Ctrl+Shift+P) > Window Reload
Push to Github. Open command line in package's folder, type following:
- git fetch
- git status
- git add .
- git commit -m "update something"
- git push
Publish your package to atom site:
- Make sure you have requirements for publishing a package (package.json and git tag)
- Open command line, go to your package folder
- You may need to connect with your atom account via apm command
- Change git local user (remove
--global tag
) - Type:
git tag
- Type
apm publish major/minor/patch
(see more) - Congrats!
Install package:
- Via website: https://atom.io/packages/op-nhom1demo
- Via Atom: File > Settings > Install > Search "op-nhom1demo" > Install
- Via apm command: apm install op-nhom1demo
Uninstall package:
- Via Atom: File > Settings > Packages > Search "op-nhom1demo" > Uninstall
- Via apm command: apm uninstall op-nhom1demo
List of npm dependencies:
- atom-select-list: 0.7.2+
- cson: 7.20.0+
- fuzzaldrin: 2.1.0+
- season: 6.0.2+
- underscore-plus: 1.7.0+
Tags and versions:
- v0.1.1: Make some final edits for README
- v0.1.0: Add cson package for reading .cson snippet file, add atom-select-list package for modal panel with click to use snippet (type
~
to open the modal panel) - v0.0.4: Change command name and add key bind. To run old snippet, select word (list of words in main.js) and press
Ctrl+Alt
. - v0.0.3: Add HTML, CSS, JS snippet using snippet folder
- v0.0.2: Add snippet feature by using atom API to select text and insert text
- v0.0.1: barebone main.js with very simple console log