ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Native​Script Snippets

by tsvetan-ganev ST2/ST3

{N}ativeScript snippets for Sublime Text.

Details

Installs

  • Total 2K
  • Win 703
  • OS X 519
  • Linux 285
Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9
Windows 0 1 4 2 1 0 2 1 1 3 0 2 2 0 0 1 2 0 1 2 0 1 2 0 1 1 0 1 0 0 0 0 2 1 1 3 1 0 0 1 1 0 0 0 1 1
OS X 0 0 0 2 0 0 0 1 1 0 1 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 0 1 0 1 2 0 2 3 3 3 1 1 0 0
Linux 0 2 0 0 0 0 0 0 0 0 0 0 0 1 2 2 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 1 0 0 1 3 1 0 0 0 1 1 0 1 1 0

Readme

Source
raw.​githubusercontent.​com

Sublime {N}ativeScript Snippets

This package contains XML snippets for NativeScript's UI components (Layouts and Widgets) as well as some frequently used attributes.

Snippets

All snippets are based on the official NativeScript documentation.

UI components are prefixed with ns, while attributes do not have a prefix.

Currently the package includes the following snippets:

UI Components

Layouts

  • Absolute Layout - nsabsolute
  • Dock Layout - nsdock
  • Grid Layout - nsgrid
  • Stack Layout - nsstack
  • Wrap Layout - nswrap

Widgets

  • Page - nspage
  • Action Bar - nsactionbar
  • Label - nslabel
  • Text Field - nstextfield
  • Secure Text Field (for passwords) - nspassword
  • Text View - nstextview
  • Image - nsimg
  • Border - nsborder
  • Button - nsbtn
  • SearchBar - nssearchbar
  • Switch - nsswitch
  • Slider - nsslider
  • Progress - nsprogress
  • Activity Indicator - nsloading
  • Date Picker - nsdate
  • Time Picker - nstime
  • List Picker - nslistpicker
  • Segmented Bar - nssegmentedbar
  • Tab View - nstabview
  • List View - nslistview
  • Web View - nswebview

Attributes

  • cssClass - css
  • text - text
  • icon - icon
  • tap - tap
  • textWrap - wrap
  • horizontalAlignment - halign
  • verticalAlignment - valign
  • visibility - visibility
  • stretch - stretch
  • keyboardType - kbtype
  • colSpan - colspan
  • rowSpan - rowspan
  • row - row
  • col - col
  • width - width
  • height - height

Feel free to edit the contents of this package, make contributions and suggest improvements.

Additional Information

If you happen to also use Visual Studio Code, please have a look at {N} snippets for VS Code where I have uploaded the same snippets but for Microsoft's code editor.

If you have any technical questions regarding NativeScript, you can join the Google+ Community and the Google+ Forum where NativeScript enthusiasts gather and share their knowledge.

And finally - have fun developing your next cross-platform mobile application!