{"id":41789,"date":"2022-07-01T15:02:49","date_gmt":"2022-07-01T15:02:49","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=41789"},"modified":"2022-07-01T15:02:49","modified_gmt":"2022-07-01T15:02:49","slug":"vim-new-script-syntax-popup-menu","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2022\/07\/vim-new-script-syntax-popup-menu\/","title":{"rendered":"Vim 9.0 Released with New Script Syntax, Popup Menu Command Completion"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/vim-logo.webp\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/vim-logo-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" class=\"alignleft size-thumbnail wp-image-41790\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/vim-logo-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/vim-logo-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/vim-logo-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/vim-logo-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/vim-logo.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>The popular Vim text editor released new major 9.0 version few days ago with many new features and large number of new features.<\/p>\n<p>The new release introduced <b>Vim9 script<\/b> with drastic performance improvements. The execution speed can be increased via <i><b>10 to 100 times faster<\/b><\/i>. However, function must be defined with <code>def<\/code>, and the argument and return types must be specified to benefit from the speed-up.<\/p>\n<p><b>Legacy scripts will keep working as before<\/b>. The new script syntax now looks a lot more like most programming languages. Line continuation does not require using a backslash; Function calls do not require <code>call<\/code>, assignments are done without <code>let<\/code> and expressions are evaluated without <code>eval<\/code>. And, comments now start with <b>#<\/b>.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/gvim9.webp\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/gvim9-600x420.webp\" alt=\"\" width=\"600\" height=\"420\" class=\"aligncenter size-large wp-image-41793\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/gvim9-600x420.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/gvim9-300x210.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/gvim9.webp 680w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>Instead of the &#8216;wildmenu&#8217; option, now a popup menu can be used in Vim 9 by setting &#8220;wildoptions&#8217; to &#8220;pum&#8221;. Which, allows for showing many more command line completion matches. The updated <a href=\"https:\/\/github.com\/vim\/colorschemes\" rel=\"noopener\" target=\"_blank\">colorschemes<\/a> are also included in the release.<\/p>\n<p>New options in the release including:<\/p>\n<ul>\n<li><code>'autoshelldir'<\/code>          change directory to the shell&#8217;s current directory<\/li>\n<li><code>'cdhome'<\/code>                change directory to the home directory by &#8220;:cd&#8221;<\/li>\n<li><code>'cinscopedecls'<\/code>         words that are recognized by &#8216;cino-g&#8217;<\/li>\n<li><code>'guiligatures'<\/code>      GTK GUI: ASCII characters that can form shapes<\/li>\n<li><code>'mousemoveevent'<\/code>        report mouse moves with <MouseMove><\/li>\n<li><code>'quickfixtextfunc'<\/code>      function for the text in the quickfix window<\/li>\n<li><code>'spelloptions'<\/code>          options for spell checking<\/li>\n<li><code>'thesaurusfunc'<\/code>         function to be used for thesaurus completion<\/li>\n<li><code>'xtermcodes'<\/code>            request terminal codes from an xterm<\/li>\n<\/ul>\n<p>There are as well new ex commands, functions, variables and operators. See <a href=\"https:\/\/vimhelp.org\/version9.txt.html#new-9\" rel=\"noopener\" target=\"_blank\">more about Vim 9<\/a> via its news page.<\/p>\n<h3>How to Get Vim 9 in Ubuntu Linux<\/h3>\n<p>Vim offers official AppImage package, along with the source tarball they are available to download at the link below:<\/p>\n<div class=\"wp-block-buttons aligncenter\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-vivid-cyan-blue-to-vivid-purple-gradient-background has-text-color has-background\" href=\"https:\/\/github.com\/vim\/vim-appimage\/releases\/latest\" target=\"_blank\" rel=\"noreferrer noopener\">Download Latest VIM (AppImage)<\/a><\/div>\n<\/div>\n<p>There&#8217;s another universal <a href=\"https:\/\/flathub.org\/apps\/details\/org.vim.Vim\" rel=\"noopener\" target=\"_blank\">Flatpak package<\/a> available, though not updated at the moment of writing. For Windows, MacOS and other sources, go to <a href=\"https:\/\/www.vim.org\/download.php\" rel=\"noopener\" target=\"_blank\">vim.org\/download.php<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>The popular Vim text editor released new major 9.0 version few days ago with many new features and large number of new features. The new release introduced Vim9 script with drastic performance improvements. The execution speed can be increased via 10 to 100 times faster. However, function must be defined with def, and the argument [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":41790,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[597],"class_list":["post-41789","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-text-editor"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/41789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=41789"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/41789\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/41790"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=41789"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=41789"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=41789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}