https://wiki.archlinux.org/api.php?action=feedcontributions&user=Towb&feedformat=atomArchWiki - User contributions [en]2024-03-29T05:18:12ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Visual_Studio_Code&diff=503133Visual Studio Code2017-12-18T21:24:43Z<p>Towb: Update AUR package name</p>
<hr />
<div>[[Category:Development]]<br />
[[Category:Text editors]]<br />
[[ja:Visual Studio Code]]<br />
[[zh-hans:Visual Studio Code]]<br />
'''Visual Studio Code''' ('''VSCode''') is a cross-platform, free and open-source (licensed under the MIT License) text editor developed by Microsoft and written in JavaScript and TypeScript. It is built on the Electron framework and is extensible using extensions, which can be browsed from within the text editor itself (via its extension gallery) or from https://marketplace.visualstudio.com/VSCode. While open-source, a proprietary build (licensed under an End-User License Agreement) provided by Microsoft is available and used as the basis for the {{AUR|visual-studio-code}} AUR package (for an explanation of the mixed licensing, see this GitHub [https://github.com/Microsoft/vscode/issues/60#issuecomment-161792005 comment]).<br />
<br />
== Installation ==<br />
The following packages provide VSCode:<br />
<br />
* {{AUR|visual-studio-code-bin}}<br />
* {{AUR|visual-studio-code-oss}}<br />
* {{AUR|visual-studio-code-git}}<br />
* ''code-oss'' from the unofficial [[Unofficial user repositories#pkgbuild-current|pkgbuild-current]]{{Broken section link}} repository. Further details can be found in its README [https://github.com/fusion809/PKGBUILDs/blob/master/README.md here]. {{Note|Bugs regarding binary packages from the ''pkgbuild-current'' repository can be reported on [https://github.com/fusion809/PKGBUILDs/issues GitHub]. Bugs regarding Visual Studio Code itself should be reported upstream.}}<br />
<br />
===Debugging C#===<br />
If you want to debug C# code install {{AUR|icu55}} otherwise you will end up with a 'Debug adapter process has terminated unexpectedly' error<br />
<br />
== Usage ==<br />
<br />
Run {{ic|code}}. <br />
<br />
If for any reason you wish to launch multiple instances of Visual Studio Code, the {{ic|-n}} flag can be used.<br />
<br />
==Configuration==<br />
<br />
Visual Studio Code settings are stored in {{ic|~/.config/Code/User/settings.json}}.<br />
<br />
===Integrated Terminal===<br />
<br />
''View > Integrated Terminal'' or {{ic|Ctrl + `}} opens up an integrated terminal.<br />
By default, [[Bash]] is used with no additional arguments, although this can be changed.<br />
{{ic|terminal.integrated.shell.linux}} sets the default shell to be used and<br />
{{ic|terminal.integrated.shellArgs.linux}} sets the arguments to be passed to the shell.<br />
<br />
Example:<br />
<br />
{{hc|~/.config/Code/User/settings.json|<br />
"terminal.integrated.shell.linux": "/usr/bin/fish",<br />
"terminal.integrated.shellArgs.linux": ["-l","-d 3"]<br />
}}<br />
<br />
===External Terminal===<br />
<br />
If you are using '''Terminator''' as default terminal for Arch and you have an error on Visual Studio Code: {{ic|Unable to launch debugger worker process (vsdbg) through the terminal. spawn truecolor ENOENT}}, you can change the terminal that will be used by Visual Studio to another terminal (eg gnome-terminal).<br />
<br />
{{ic|"terminal.external.linuxExec": "Yours alternative terminal"}} sets the default terminal to be used for exec debug.<br />
<br />
Example:<br />
<br />
{{hc|~/.config/Code/User/settings.json|<br />
"terminal.external.linuxExec": "gnome-terminal"<br />
}}</div>Towbhttps://wiki.archlinux.org/index.php?title=Vifm&diff=441925Vifm2016-07-17T18:54:45Z<p>Towb: /* Non-vim Users */ Added neovim example</p>
<hr />
<div>[[Category:File managers]]<br />
[[ar:Vifm]]<br />
[[ja:Vifm]]<br />
{{Related articles start}}<br />
{{Related|ranger}}<br />
{{Related articles end}}<br />
From the [http://vifm.info/ Vifm] home page:<br />
:'' Vifm is an ncurses based file manager with vi like keybindings/modes/options/commands/configuration, which also borrows some useful ideas from mutt.<br />
If you use vi, Vifm gives you complete keyboard control over your files without having to learn a new set of commands. ''<br />
<br />
== Installation ==<br />
<br />
[[Install]] {{Pkg|vifm}} from the [[official repositories]].<br />
<br />
Optional, for file previews:<br />
* {{Pkg|tree}} for directory previews<br />
* {{Pkg|mp3info}} for viewing information about mp3 files<br />
* {{Pkg|poppler}} for pdf previews<br />
<br />
== Help file ==<br />
<br />
Basic information about vifm is given in the help file. You can view it by opening vifm and typing<br />
<br />
:h<br />
<br />
Another good source of information is the man page.<br />
<br />
== Customizing Vifm ==<br />
<br />
Vifm creates and populates a .vifm folder in your home directory containing the following:<br />
* vifmrc - a well commented configuration file that can be edited to suit your working style.<br />
* vifm-help.txt - the help text<br />
* vifminfo - bookmarks and trash contents - it is not recommended to edit this file by hand<br />
* Trash/ directory - self explanatory<br />
* colors/ directory - color schemes<br />
** Default - well commented default color scheme - can be copied to create user-created color schemes<br />
<br />
To get started, read the information avaliable in:<br />
* {{ic|/usr/share/vifm/vifm.txt}}<br />
* {{ic|/usr/share/vifm/vifm-help.txt}}<br />
<br />
=== Color schemes ===<br />
<br />
The {{ic|~/.vifm/colors}} directory contains the color schemes. The format is outlined in the file and follows vi/vim syntax highlight format. It is basically:<br />
highlight ''group'' cterm=''attribute'' ctermfg=''color'' ctermbg=''color''<br />
<br />
An example colorscheme looks like:<br />
highlight Win cterm=none ctermfg=white ctermbg=black<br />
highlight Directory cterm=bold ctermfg=cyan ctermbg=none<br />
highlight Link cterm=bold ctermfg=yellow ctermbg=none<br />
highlight BrokenLink cterm=bold ctermfg=red ctermbg=none<br />
highlight Socket cterm=bold ctermfg=magenta ctermbg=none<br />
highlight Device cterm=bold ctermfg=red ctermbg=none<br />
highlight Fifo cterm=bold ctermfg=cyan ctermbg=none<br />
highlight Executable cterm=bold ctermfg=green ctermbg=none<br />
highlight Selected cterm=bold ctermfg=magenta ctermbg=none<br />
highlight CurrLine cterm=bold ctermfg=none ctermbg=blue<br />
highlight TopLine cterm=none ctermfg=black ctermbg=white<br />
highlight TopLineSel cterm=bold ctermfg=black ctermbg=none<br />
highlight StatusLine cterm=bold ctermfg=black ctermbg=white<br />
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black<br />
highlight CmdLine cterm=none ctermfg=white ctermbg=black<br />
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black<br />
highlight Border cterm=none ctermfg=black ctermbg=white<br />
<br />
You can also highlight different filetypes using regular expressions:<br />
highlight /^.*\.(mp3|ogg|oga|flac|m4a)$/ ctermfg=magenta<br />
highlight /^.*\.(jpg|jpeg|png|gif|tiff|webp|bmp|svg|svgz)$/ ctermfg=yellow<br />
highlight /^.*\.(zip|gz|bz2|xz|tar|tgz|tbz2|7z|rar|iso|rpm|deb)$/ ctermfg=red<br />
<br />
=== Key mapping ===<br />
<br />
As of 0.6.2 you can customize key bindings in Vifm. These can be set from the command mode using the map command, like so:<br />
:map ] :s<br />
<br />
However, these mappings will not be saved between sessions. To map a key permanently, place them in ~/vifm/vifmrc. More sample mappings can be seen at the end of that file.<br />
<br />
=== Opening filetypes in vifm ===<br />
<br />
You can assign applications to filetypes in vifmrc, eg.<br />
filetype *.jpg,*.jpeg,*.png,*.gif feh %f 2>/dev/null &<br />
filetype *.md5 md5sum -c %f<br />
Several defaults can be found in vifmrc. These can be edited or added to following the same format.<br />
<br />
==== Browse images in current directory with Feh ====<br />
<br />
filextype *.jpg,*.jpeg,*.png,*.gif<br />
\ {View in feh}<br />
\ feh -FZ %d --start-at %d/%c 2>/dev/null<br />
It will display your selected image in feh, but it will enable you to browse all other images in the directory as well, in their default order.<br />
<br />
=== User commands ===<br />
<br />
You can also create custom commands in vifmrc, eg.<br />
command df df -h %m 2> /dev/null<br />
command diff vim -d %f %F<br />
<br />
==== Creating symbolic links ====<br />
<br />
command link ln -s %d/%f %D<br />
When you call <br />
:link<br />
a link of the selected file is made in the other directory (if you are in split view). It even works with multiple files selected with visual (v) or tag (t).<br />
<br />
==== Torrent creation ====<br />
<br />
make a .torrent of the current file in the other tab's dir<br />
command mkt mktorrent -p -a [your announce url here] -o %D/%f.torrent %d/%f<br />
<br />
=== Marks ===<br />
<br />
Marks can be set same as in vi.<br />
To set a mark for current file:<br />
m[a-z][A-Z][0-9]<br />
Go to a file set for mark:<br />
'[a-z][A-Z][0-9]<br />
Vifm will remember the marks between the sessions.<br />
<br />
== Tips and tricks ==<br />
<br />
=== Useful key mappings ===<br />
<br />
Single stroke to access command line<br />
nmap ; :<br />
<br />
=== Non-vim Users ===<br />
{{ic|vifm}} assumes that you are using {{ic|vim}} and will throw errors if it doesn't find it. If you are using {{ic|vi}} or {{ic|nvim}} ([[Neovim]]), you need to edit your {{ic|~/.vifm/vifmrc}} file. Comment out the line {{ic|<nowiki>set vicmd=vim</nowiki>}} and replace it with {{ic|<nowiki>set vicmd=vi</nowiki>}} or {{ic|<nowiki>set vicmd=nvim</nowiki>}}. Note that, just like {{ic|.exrc}}, comment lines are introduced by double quotes.</div>Towb