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 906
  • OS X 623
  • Linux 369
Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6
Windows 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 2 1 0 0 1 0 0 0 0 2 3 0 0 1 0 1 0 0 0 0 0 1 1 0 2 0 1 3 1 1 2
OS X 0 1 2 0 0 0 0 1 1 0 1 0 0 0 0 1 1 1 1 2 0 1 0 1 0 0 0 1 0 0 1 0 0 2 0 0 1 0 0 0 1 1 0 0 0 0
Linux 0 1 1 0 0 1 1 0 0 1 0 1 1 1 1 1 0 1 1 0 0 0 0 0 0 2 0 0 2 2 1 0 2 1 0 0 0 1 0 1 0 0 0 1 0 1

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!