On November 18, 2015, the source of Visual Studio Code was released under the MIT License, and made available on GitHub. A preview build was released shortly thereafter. Visual Studio Code was first announced on April 29, 2015, by Microsoft at the 2015 Build conference. In the Stack Overflow 2022 Developer Survey, Visual Studio Code was ranked the most popular developer environment tool among 71,010 respondents, with 74.48% reporting that they use it. Users can change the theme, keyboard shortcuts, preferences, and install extensions that add functionality. Features include support for debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git. Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft with the Electron Framework, for Windows, Linux and macOS. Binaries built by Microsoft: Proprietary software.Let me know in comments about the code profile or need any help. Conclusionīy using this procedure we can create as many VS Code instances as we like according to our development needs without bloating the main code editor. Also create new bash profile alias named code-vue. The same methodology is applied to have VueJS based VS Code editor by adding another folder named code-vue and then same steps just calling code-vue instead of code-ruby. This will open the folder with ruby extensions and settings you saved. Now in terminal go to working folder for ruby and run instead of code. So go in bash profile file and add the following code: alias code-ruby="code -extensions-dir ~/code_profiles/code-ruby/exts -user-data-dir ~/code_profiles/code-ruby/data" Terminal alias commandĪs this command is long enough to use every time, we will use the power of aliases in bash profile. Now every extension, themes, and settings will save in our code_profiles -> code-rubyfolder and won’t change the main VS Code settings or extensions. This command will run code with extensions folder specified in code-ruby folder and user data as well in the provided folder. ![]() Now in terminal run: code -extensions-dir ~/code_profiles/code-ruby/exts -user-data-dir ~/code_profiles/code-ruby/data This code snippet will create code_profiles in home directory of system and within that code-ruby and within code-ruby add folders exts and data. ![]() In terminal enter the following codes: cd Lastly, I can call simple VS Code to get simple bare bone VS Code. So next time if I want to use VS Code for NodeJS I would call the same VS Code but with a different folder of extensions and settings. So if I want to use VS Code for Ruby on Rails I created a separate folder of extensions and settings for ruby and call code in command line with providing VS Code where to find extensions and settings. The main concept behind code profiles is that why not we make these two folders different and call those folders of extensions and settings according to our project settings. ![]() VS Code makes two folders in system’s library one is exts where all the extensions and their versions are downloaded and stored and the other is data folder where all the user data of code, including settings, are saved. The basic concept of code profile can be better understood by understanding how VS Code actually works. This is the most important as code profiles can only work by running in command line. ![]() By this, you will be able to run code in your terminal. Now activate the CLI by hitting cmd+shift+p and run Shell Command: Install 'code' command in path. Install the latest simple VS Code in the system. Now I can have as many VS Code instances as many types of works I do and still, I have main VS Code remaining for just viewing folder or file in the raw editor. I stumbled upon an article by this, he explained the implementation of by which we can use different profiles of same VS Code. For example, there are frequent updates of VS Code insiders than others and as insiders is beta program, there is always a tension whether the new editor will have a problem or not. Furthermore, if an update of editor comes, then it will be updated to one type of language editor. It was a hectic job to maintain different editors to what extensions I should use and if I use one editor, then there becomes a great clutter of extensions and settings also mismatch for one language extension to the other. So, I went for sublime text for Ruby on Rails, Visual Studio Code for NodeJS and Visual Studio Code Insiders for VueJS development. The problem I faced using a code editor is to use different ones for different programming languages. VSCode PRO-TIP: Code Profiles (multi-environment development)Ĭreate different VSCode Instances based on settings, extensions and programming languages using one installed instance in system.
0 Comments
Leave a Reply. |