Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Move SnippetNew to Visual Studio Code? Get it now.
Move Snippet

Move Snippet

Rana Hardik

|
99 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Move Language Snippet extension for VSCode

A snippet pack to make you more productive working with Move Language. Based on Visual Studio extension by Rana Hardik,

This extension provide you Move snippets.


Setup

Install move-analyzer extension from marketplace.


How to use

To get suggestions simply write mv which show you the list of all available code snippets for move language.

Command Description
mv-variable Declare any variable in move
mv-u8 Declare u8 variable in move
mv-u16 Declare u16 variable in move
mv-u32 Declare u32 variable in move
mv-u64 Declare u64 variable in move
mv-128 Declare u64 variable in move
mv-bool Declare boolean variable in move
mv-address Declare address variable in move
mv-as , as , cast Cast variable in move
mv-init-module Define init_module function in move
mv-main-function Define main function in move
mv-public-function Define public function in move
mv-entry-function Define entry function in move
mv-friend-function Define friend function in move
mv-inline-function Define inline function in move
mv-native-function Define native function in move
mv-if Write if condition in move
mv-if-else Write if else condition in move
mv-if-abort Write conditional abort in move
mv-assert Write assert in move
mv-loop Write Infinite loop in move
mv-module Write module in move
mv-struct Create structure in move
mv-struct-access Access structure in move
mv-struct-destroy Destructing or destroy structures in move
mv-struct-destroy-unused Destroy structures with unused variable in move
mv-has Define type to your structure in move
copy , drop , store , key Define type to your structure in move
mv-copy-variable-value Copy variable value in other variable in move
&mut , copy , move , * Ownership and References in move
mv-vector Use all vector properties in move
mv-signer Use all signer properties in move
mv-friend , friend Use friend keyword in move

Snippets for vector

Command Description
mv-vector Vector properties in move
mv-vector-empty Create an empty vector that can store values of type T
mv-vector-singleton Create a vector of size 1 containing t
mv-vector-push-back Add value to the end of vector
mv-vector-pop-back Remove and return the last element in vector
mv-vector-borrow Return an immutable reference of vector value
mv-vector-borrow-mut Return a mutable reference of vector value
mv-vector-destroy-empty Delete vector
mv-vector-append Add the elements in v2 to the end of v1
mv-vector-contains Return true if e is in the vector v. Otherwise, returns false
mv-vector-swap Swaps the elements at the ith and jth indices in the vector v
mv-vector-reverse Reverses the order of the elements in the vector v in place
mv-vector-index-of Return (true, i) if e is in the vector v at index i. Otherwise, returns (false, 0)
mv-vector-remove Remove the ith element of the vector v, shifting all subsequent elements. This is O(n) and preserves ordering of elements in the vector
mv-vector-swap-remove Remove the ith element of the vector v, shifting all subsequent elements. This is O(n) and preserves ordering of elements in the vector

Global Storage operators for unit test

Command Description
mv-move-to Global Storage Operators in move
mv-move-from Global Storage Operators in move
mv-borrow-global-mut Global Storage Operators in move
mv-borrow-global Global Storage Operators in move
mv-exists Global Storage Operators in move

Snippets for toml file

Command Description
mv-package , package Define package in toml file in move
mv-addresses , addresses Define addresses in toml file in move
mv-dependencies , dependencies Define dependencies in toml file in move
mv-dev-addresses , dev-addresses Define dev-addresses in toml file in move
mv-dev-dependencies , dev-dependencies Define dev-dependencies in toml file in move

Snippets for unit test

Command Description
mv-test , test Unit test in move
mv-test-only , test-only Unit test in move
mv-expected-failure , expected-failure Unit test in move

Supported languages (file extensions)

.mv

.move

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft