Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Hardware & Software Help
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Hardware & Software Help Hardware & Software related questions & help.

Reply
 
Thread Tools
Old 10-15-2018, 05:51 PM   #1
llarian
Orbinaut
 
llarian's Avatar
Question Using VS Code ... not an Orbiter thread ...

Hi guys. I recently installed Anaconda3 for a bit of Python work and to familiarize myself with it. After the usual installation headaches, it also loaded in Visual Studio Code.

I know VS Code is primarily an editor and similar functions often take similar forms. My question is, do any of you use VS Code and what are your opinions of it and what advises might you give?

Thanks in advance

Editted: Any suggestions for adding Lua to VS Code?
llarian is offline   Reply With Quote
Old 10-15-2018, 06:44 PM   #2
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

I used it at work for a quick C# project and really liked it. Especially the pretty UNIX like dev process.
Urwumpe is online now   Reply With Quote
Old 10-15-2018, 07:30 PM   #3
dbeachy1
O-F Administrator
 
dbeachy1's Avatar


Default

I use VS Code at work for both Angular and Ruby on Rails (and did some Ember in it for a few months), and I quite like it: it's fast, lightweight, and has IntelliSense for a number of languages (check plugins for it).
dbeachy1 is offline   Reply With Quote
Thanked by:
Old 10-15-2018, 08:09 PM   #4
n122vu
Addon Developer
 
n122vu's Avatar

Default

I use it at work as well for just editing single code or config files, when I don't need full-blown Visual Studio features. My go-to editor most of the time.
n122vu is offline   Reply With Quote
Old 10-15-2018, 09:15 PM   #5
llarian
Orbinaut
 
llarian's Avatar
Default

Thanks. You guys are great! Well, no fears then, just the usual jitters. Best to delve right in.

And I did find and install the Lua extension. Time to learn.
llarian is offline   Reply With Quote
Old 10-16-2018, 06:11 AM   #6
jedidia
shoemaker without legs
 
jedidia's Avatar
Default

Quote:
My question is, do any of you use VS Code and what are your opinions of it and what advises might you give?
Using it at work for pretty much all jobs that involve simple scripting where an IDE only gets in the way. There was a time I also did angular with it, and it works well enough, but then we got a license for the complete jetbrains product package, so WebStorm has taken over for that. I still prefer it to RubyMine for managing our puppet repository, though that's probably just because I never get the time to give RubyMine a real chance. I also used to do PhP with it, for the rare times I had to bother with that horrible misconception of a language...

That's really the greates strength of VS Code, I think. At the core, it really is just an editor, and there's basically no time investment needed to get going, but it also provides a lot of conveniences like folder view, source managment and integrated console that make life a lot easier when compared to other editors.
jedidia is offline   Reply With Quote
Old 10-16-2018, 08:34 AM   #7
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Quote:
Originally Posted by jedidia View Post
 Using it at work for pretty much all jobs that involve simple scripting where an IDE only gets in the way.
Or in my case: Needed to replace a small command line tool at the customer with a version that works. No sources available, but after a bit of reverse engineering, the function was clear. And why it did not work.

A full Visual Studio installation would cost a bit of money, too much for a task that only needs to be done once per year, if at all. Also too powerful for something that only consists of two source files and a few test suites.

Visual Studio Code was absolutely well suited for the task, once you mastered the dotnet command.
Urwumpe is online now   Reply With Quote
Old 10-16-2018, 09:39 AM   #8
jedidia
shoemaker without legs
 
jedidia's Avatar
Default

Quote:
A full Visual Studio installation would cost a bit of money
Well, there's always the express edition, but yes, the thing is really too large and unwieldy for simple stuff.
jedidia is offline   Reply With Quote
Old 10-16-2018, 09:49 AM   #9
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Quote:
Originally Posted by jedidia View Post
 Well, there's always the express edition, but yes, the thing is really too large and unwieldy for simple stuff.
It would also cause some licensing issues for a top two car manufacturer.
Urwumpe is online now   Reply With Quote
Old 10-16-2018, 11:15 AM   #10
jedidia
shoemaker without legs
 
jedidia's Avatar
Default

Quote:
It would also cause some licensing issues for a top two car manufacturer.
If it's only being used for maintaining internal software? Shouldn't that be covered by the express license?
jedidia is offline   Reply With Quote
Old 10-16-2018, 11:33 AM   #11
Urwumpe
Certain Super User
 
Urwumpe's Avatar

Default

Quote:
Originally Posted by jedidia View Post
 If it's only being used for maintaining internal software? Shouldn't that be covered by the express license?
Not sure there - that is what you should ask a lawyer there. I remember how terrible I had to explain why I am including Guice in a Java project and if that is legal.
Urwumpe is online now   Reply With Quote
Old 10-16-2018, 01:15 PM   #12
Blake
Addon Developer
Default

My understanding:
'Express' is now 'Community' and it is free unless you are an enterprise (there are other exceptions):


If you are an enterprise, your employees and contractors may not use the software to develop or test your applications, except for: (i) open source; (ii) Visual Studio extensions; (iii) device drivers for the Windows operating system; and, (iv) education purposes as permitted above.


An “enterprise” is any organization and its affiliates who collectively have either (a) more than 250 PCs or users or (b) one million U.S. dollars (or the equivalent in other currencies) in annual revenues, and “affiliates” means those entities that control (via majority ownership), are controlled by, or are under common control with an organization.



https://visualstudio.microsoft.com/l...rms/mlt553321/


I use the free 'Community' edition for personal work, and a paid subscription for professional work, which like Urwumpe is for one of the most well-known enterprises in the world and can afford a license or two.



For me, Code is slowly replacing Notepad++...slowly.
Blake is online now   Reply With Quote
Thanked by:
Old 10-16-2018, 02:18 PM   #13
n122vu
Addon Developer
 
n122vu's Avatar

Default

Same here. We fall under the Enterprise definition of the license, and each dev has an MSDN subscription provided by the company.

Quote:
Originally Posted by Blake
 For me, Code is slowly replacing Notepad++...slowly.
Same here. In fact I recently got a new laptop at work, about 2 months ago. I installed Notepad++ after migrating all my work, but I honestly don't think I've launched it yet. Everything I do these days is in VS Code or Visual Studio Pro.
n122vu is offline   Reply With Quote
Thanked by:
Old 12-09-2018, 10:26 PM   #14
Majid
Orbinaut
Default

Don't want to necro, but as there haven't been any other posts in this forum lately I thought I'd share my vim setup:

I use Vundle for plugin management.



My .vimrc

Code:
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'Townk/vim-autoclose'
Plugin 'scrooloose/nerdtree'
Plugin 'flazz/vim-colorschemes'
Plugin 'pangloss/vim-javascript'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'Shougo/unite.vim'
Plugin 'Shougo/vimproc.vim'
Bundle 'L9'
Bundle 'FuzzyFinder'
Plugin 'maksimr/vim-jsbeautify'
Plugin 'tpope/vim-fugitive'
Plugin 'OmniSharp/omnisharp-vim'
" Track the engine.
Plugin 'SirVer/ultisnips'
Plugin 'vim-syntastic/syntastic'
" Snippets are separated from the engine. Add this if you want them:
Plugin 'honza/vim-snippets'
Plugin 'fatih/vim-go'
Plugin 'python-mode/python-mode'
Plugin 'kien/ctrlp.vim'
Plugin 'zcodes/vim-colors-basic'
Plugin 'dikiaap/minimalist'
Plugin 'othree/xml.vim'
Plugin 'millermedeiros/vim-esformatter'
Plugin 'ruanyl/vim-fixmyjs'
Plugin 'mxw/vim-jsx'
Plugin 'airblade/vim-gitgutter' 
" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required

" activates syntax highlighting among other things
syntax on
syntax enable

" allows you to deal with multiple unsaved
" buffers simultaneously without resorting
" to misusing tabs

" just hit backspace without this one and
" see for yourself
set backspace=indent,eol,start

set expandtab
set shiftwidth=2
set softtabstop=2
set laststatus=2
nmap ,b :FufBuffer<CR>
"nmap ,f :FufFile<CR>
nmap ,f :FufFileWithFullCwd **/<CR>
nmap ,w :bd<CR>
set guifont=Fira\ Mono\ For\ Powerline:h14
set shortmess+=A
set ic
map <c-f> :call JsBeautify()<cr>
let g:fuf_help_cache_dir = ''
let g:fuf_tag_cache_dir = ''
let g:fuf_taggedfile_cache_dir = ''
nmap <leader>ne :NERDTree<cr>
map <F11> <Esc>:call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)<CR> 
let g:Omnisharp_start_server = 0
" OmniSharp won't work without this setting
filetype plugin on

"This is the default value, setting it isn't actually necessary
let g:OmniSharp_host = "http://localhost:2000"

"Set the type lookup function to use the preview window instead of the status line
"let g:OmniSharp_typeLookupInPreview = 1

"Timeout in seconds to wait for a response from the server
let g:OmniSharp_timeout = 1

"Showmatch significantly slows down omnicomplete
"when the first match contains parentheses.
set noshowmatch

"Super tab settings - uncomment the next 4 lines
let g:SuperTabDefaultCompletionType = 'context'
let g:SuperTabContextDefaultCompletionType = "<c-x><c-o>"
let g:SuperTabDefaultCompletionTypeDiscovery = ["&omnifunc:<c-x><c-o>","&completefunc:<c-x><c-n>"]
let g:SuperTabClosePreviewOnPopupClose = 1

"don't autoselect first item in omnicomplete, show if only one item (for preview)
"remove preview if you don't want to see any documentation whatsoever.
set completeopt=longest,menuone,preview
" Fetch full documentation during omnicomplete requests.
" There is a performance penalty with this (especially on Mono)
" By default, only Type/Method signatures are fetched. Full documentation can still be fetched when
" you need it with the :OmniSharpDocumentation command.
let g:omnicomplete_fetch_documentation=1

"Move the preview window (code documentation) to the bottom of the screen, so it doesn't move the code!
"You might also want to look at the echodoc plugin
set splitbelow

" Get Code Issues and syntax errors
let g:syntastic_cs_checkers = ['syntax', 'semantic', 'issues']
" If you are using the omnisharp-roslyn backend, use the following
" let g:syntastic_cs_checkers = ['code_checker']
augroup omnisharp_commands
    autocmd!

    "Set autocomplete function to OmniSharp (if not using YouCompleteMe completion plugin)
    autocmd FileType cs setlocal omnifunc=OmniSharp#Complete

    nnoremap <Leader>dnb :!dotnet build<CR>
    nnoremap <Leader>dnr :!dotnet run<CR>
    " Synchronous build (blocks Vim)
    "autocmd FileType cs nnoremap <F5> :wa!<cr>:OmniSharpBuild<cr>
    " Builds can also run asynchronously with vim-dispatch installed
    "autocmd FileType cs nnoremap <leader>b :wa!<cr>:OmniSharpBuildAsync<cr>
    " automatic syntax check on events (TextChanged requires Vim 7.4)
    autocmd BufEnter,TextChanged,InsertLeave *.cs SyntasticCheck

    " Automatically add new cs files to the nearest project on save
    "autocmd BufWritePost *.cs call OmniSharp#AddToProject()

    "show type information automatically when the cursor stops moving
    autocmd CursorHold *.cs call OmniSharp#TypeLookupWithoutDocumentation()

    "The following commands are contextual, based on the current cursor position.

    autocmd FileType cs nnoremap gd :OmniSharpGotoDefinition<cr>
    autocmd FileType cs nnoremap <leader>fi :OmniSharpFindImplementations<cr>
    autocmd FileType cs nnoremap <leader>ft :OmniSharpFindType<cr>
    autocmd FileType cs nnoremap <leader>fs :OmniSharpFindSymbol<cr>
    autocmd FileType cs nnoremap <leader>fu :OmniSharpFindUsages<cr>
    "finds members in the current buffer
    autocmd FileType cs nnoremap <leader>fm :OmniSharpFindMembers<cr>
    " cursor can be anywhere on the line containing an issue
    autocmd FileType cs nnoremap <leader>x  :OmniSharpFixIssue<cr>
    autocmd FileType cs nnoremap <leader>fx :OmniSharpFixUsings<cr>
    autocmd FileType cs nnoremap <leader>tt :OmniSharpTypeLookup<cr>
    autocmd FileType cs nnoremap <leader>dc :OmniSharpDocumentation<cr>
    "navigate up by method/property/field
    "autocmd FileType cs nnoremap <C-K> :OmniSharpNavigateUp<cr>
    "navigate down by method/property/field
    "autocmd FileType cs nnoremap <C-J> :OmniSharpNavigateDown<cr>

augroup END


" this setting controls how long to wait (in ms) before fetching type / symbol information.
set updatetime=500
" Remove 'Press Enter to continue' message when type information is longer than one line.
set cmdheight=2

" Contextual code actions (requires CtrlP or unite.vim)
nnoremap <leader><space> :OmniSharpGetCodeActions<cr>
" Run code actions with text selected in visual mode to extract method
vnoremap <leader><space> :call OmniSharp#GetCodeActions('visual')<cr>

" rename with dialog
nnoremap <leader>nm :OmniSharpRename<cr>
nnoremap <F2> :OmniSharpRename<cr>
" rename without dialog - with cursor on the symbol to rename... ':Rename newname'
command! -nargs=1 Rename :call OmniSharp#RenameTo("<args>")

" Force OmniSharp to reload the solution. Useful when switching branches etc.
nnoremap <leader>rl :OmniSharpReloadSolution<cr>
nnoremap <leader>cf :OmniSharpCodeFormat<cr>
" Load the current .cs file to the nearest project
nnoremap <leader>tp :OmniSharpAddToProject<cr>

" Add syntax highlighting for types and interfaces
nnoremap <leader>th :OmniSharpHighlightTypes<cr>
"Don't ask to save when changing buffers (i.e. when jumping to a type definition)
set hidden

" Enable snippet completion, requires completeopt-=preview
let g:OmniSharp_want_snippet=0
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
"let g:UltiSnipsExpandTrigger="<tab>"
"let g:UltiSnipsJumpForwardTrigger="<c-b>"
"let g:UltiSnipsJumpBackwardTrigger="<c-z>"

" If you want :UltiSnipsEdit to split your window.
" let g:UltiSnipsEditSplit="vertical"
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#buffer_nr_show = 0 


augroup reload_vimrc " {
    autocmd!
    autocmd BufWritePost $MYVIMRC source $MYVIMRC
augroup END " }

set number


" snippets
nnoremap <leader>meanstart :-1read ~/snippets/express.js<cr>
nnoremap <leader>meanmod :-1read ~/snippets/mongomod.js<cr>
nnoremap <leader>html :-1read ~/snippets/html.html<cr>
nnoremap <leader>meanroute :-1read ~/snippets/meanroute.js<cr>
nnoremap <leader>meanspec :-1read ~/snippets/meanspec.js<cr>
nnoremap <leader>meanvalid :-1read ~/snippets/meanvalid.js<cr>
nnoremap <leader>chaimocha :-1read ~/snippets/chaimocha.html<cr>
nnoremap <leader>mochaspec :-1read ~/snippets/mochaspec.js<cr>
nnoremap <leader>dirspec :-1read ~/snippets/tangdir.js<cr>
nnoremap <leader>conspec :-1read ~/snippets/tancon.js<cr>
nnoremap <leader>jspm :-1read ~/snippets/jspm.html<cr>
nnoremap <leader>eslintrc :-1read ~/snippets/eslintrc.js<cr>
nnoremap <leader>reactcomp :-1read ~/snippets/reactcomp.js<cr>
nnoremap <leader>imprr :-1read ~/snippets/imprr.js<cr>
nnoremap <leader>reactapp :-1read ~/snippets/reactapp.js<cr>
nnoremap <leader>andir :-1read ~/snippets/andir.js<cr>

nnoremap <leader>b :CtrlPBuffer<cr>
nnoremap <leader>setjs :set filetype=javascript<cr>
nnoremap <leader>setft :set filetype=
nnoremap <leader>qa :bufdo bd<cr>

set t_Co=256
syntax on
syntax enable
set background=dark
colorscheme monokai
"autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
"set omnifunc=syntaxcomplete#Complete
let g:tern#is_show_argument_hints_enabled = 1
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_fields = 1
let g:go_highlight_types = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:go_fmt_command = "goimports"
au FileType go nmap <leader>r <Plug>(go-run)
au FileType go nmap <leader>build <Plug>(go-build)
au FileType go nmap <leader>test <Plug>(go-test)
au FileType go nmap <leader>c <Plug>(go-coverage)
au FileType go nmap <leader>td <Plug>(go-def-tab)
au FileType go nmap <leader>gd <Plug>(go-doc)
au FileType go nmap <leader>s <Plug>(go-implements)

let g:syntastic_javascript_checkers = ['eslint']
au BufNewFile,BufRead *.xaml setf xml
au BufNewFile,BufRead *.cs setf cs 

nnoremap <silent> <leader>es :Esformatter<CR>
vnoremap <silent> <leader>es :EsformatterVisual<CR>
nnoremap <Leader>fix :Fixmyjs<cr>
nnoremap <F5> :silent! bufdo e<cr>
set confirm

let g:fixmyjs_rc_path = 'C:\Users\mali\.eslintrc'
let g:jsx_ext_required = 0
set hlsearch
set incsearch
nnoremap <silent> <Leader>= :exe "resize " . (winheight(0) * 3/2)<CR>
nnoremap <silent> <Leader>- :exe "resize " . (winheight(0) * 2/3)<CR>
nnoremap <silent> <Leader>0 :exe "vertical resize " . (winwidth(0) * 3/2)<CR>
nnoremap <silent> <Leader>9 :exe "vertical resize " . (winwidth(0) * 2/3)<CR>
function! NumberToggle()
  if(&relativenumber == 1)
    set nornu
  else
    set rnu
  endif
endfunc

nnoremap <silent> <Leader>num :call NumberToggle()<cr>

nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
nnoremap <C-Q> <C-W><C-Q>
set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe,*\\dist\\*,*\\node_modules\\*

let g:ctrlp_custom_ignore = '\v[\/](node_modules|target|dist)|(\.(swp|ico|git|svn|dll))$'

let g:ctrlp_max_files=0
let g:ctrlp_max_depth=40
:set guioptions-=T  "remove toolbar
:set guioptions-=r  "remove right-hand scroll bar
:set guioptions-=L  "remove left-hand scroll bar
:set guioptions-=m  "remove left-hand scroll bar

nnoremap <leader>sp :setlocal spell spelllang=en_us <cr>
map <F4> :execute "vimgrep /" . expand("<cword>") . "/j **" <Bar> cw<CR>

au FileType markdown nnoremap <leader>figure :-1read ~/snippets/figure.txt<cr>
au FileType markdown nnoremap <leader>newpost :-1read ~/snippets/newpost.txt<cr>


nmap <F2> i<C-R>=strftime("%FT%T%z")<CR><Esc>
imap <F2> <C-R>=strftime("%FT%T%z")<CR>

augroup myvimrc
    autocmd!
    autocmd QuickFixCmdPost [^l]* cwindow
    autocmd QuickFixCmdPost l*    lwindow
augroup END
VS Code is pretty nice as well, and it has a decent vim emulation mode.

Last edited by Majid; 12-10-2018 at 12:12 AM.
Majid is offline   Reply With Quote
Thanked by:
Old 12-10-2018, 12:48 AM   #15
ADSWNJ
Scientist
 
ADSWNJ's Avatar
Default

My son is at university, learning to code C, C++, Python, Java, on Linux using vim, gcc makefiles, and gdb from the command line. It's brutal compared to what we do as devs do in Windows in a nice graphical Visual Studio Express or full verison. Is there a better way, using just a text interface, not an X Window?
ADSWNJ is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Hardware & Software Help


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 06:33 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright ©2007 - 2017, Orbiter-Forum.com. All rights reserved.