Setting Cobol Tabs/Indents in Visual Studio Code - tabs

I have just installed Visual Studio Code on my Mac.
What is driving me crazy is my inability to set my tabs/indents to match my preferred Cobol formatting of columns 7, 8, 12, 16, 20, 24 and 72.
I have seen how to set the tab to 4 spaces, but that gives me Indents to column 5, 9 etc as it seems to tab column 1 + 4 which of course is 5 and then tab 4 spaces from there.

I'd guess the options are:
an extension that explicit does this already (you didn't specified if you use any COBOL extension for VSC or not)
set the rulers to your preferred settings, see Vertical rulers in Visual Studio Code? and "hope" you find a way to tab between these (if not: create an extension that does so)
Another option is always to use a different editor that is specialized on COBOL and may (depending on the dialect you code) even support syntax checking, like OCIDE...

Related

Android Studio: how to increase set ANDROID_LINT_MAX_VIEW_COUNT

My Android application, being prepared in Android Studio 3.5.3, has a layout with more than 80 different views (and this number will grow). So, the warning layout has too many views appears. I'd like to increase variable ANDROID_LINT_MAX_VIEW_COUNT up to 100 (as it is advised in the warning), but I cannot find where it can be done. Menu File->Settings->inspections does provide option Perfomance->Application size->layout has too many views describing this warning, so it is possible to suppress it. However, I'd like just to increase ANDROID_LINT_MAX_VIEW_COUNT, not to suppress it at all. I've found an advice to create environment variable ANDROID_LINT_MAX_VIEW_COUNT setting it to 100, but it does not work.
Thanks for any idea
ANDROID_LINT_MAX_VIEW_COUNT is indeed an environment variable. After setting it to a proper value, Android Studio has to be restarted, that I didn't. After restarting, the warning layout has too many views disappeared.

Comparing PDFs generated using two different versions of IText (version 2 and 7)

Currently, we are using (IText version 2 + Flying saucer) for creating PDFs from HTML and we are planning to migrate to IText version 7 (I am using trial version now) because of limitations with version 2. As part of the initial analysis, I have generated the PDFs using both version 2 and version 7 for the same HTML.
I tried to compare the pdf bytes. Some of the PDFs matched but some of them do not.
I want to know if we can rely on pdf byte comparison for comparing the PDFs generated using two different of IText for the same HTML. Is there any better way of comparing these two PDFs?
I want to know if we can rely on pdf byte comparison for comparing the PDFs generated using two different of IText for the same HTML.
No. First of all you can't rely on direct byte comparison because iText inserts a creation date and a document ID which will change even with the same iText version.
Is there any better way of comparing these two PDFs?
We use the CompareTool class to get around this internally for testing. The compareVisually() which uses Ghostscript might be sufficient for you if you expect the visual output to be the same down to the pixel even if the underlying content changed (e.g drawing 4 lines vs directly drawing a square).
That being said I doubt the visual output will be the same. pdfHTML and iText 7 have gone through vast improvements over the years so it is very likely there are some visual bugs/discrepancies in 2 that are no longer present in 7, or HTML tags/CSS properties that are supported in pdfHTML that are not supported in FlyingSaucer.
Disclaimer: I work for iText.
I stumbled over an open source project a while ago and a quick search turned up another one. I didn't try them out for myself but I would give it a try:
https://github.com/vinsguru/pdf-util
https://github.com/red6/pdfcompare
Both are based on PdfBox and offer an pixel-by-pixdel imge comparison but also other features like text comparison etc.

visual studio 2015 wdk 10 command line error

I am following this guide
https://msdn.microsoft.com/en-us/library/windows/hardware/hh439665(v=vs.85).aspx
I am using visual studio 2015 with wdk 10. However, when i am trying to build the solution (step 14), I get the following error:
command-line error: exception handling option can be used only when compiling C++ in line 1
Any ideas ?
Thank you
It's simple. There is a bug in VS 2015. You need to wait for VS 2015 Update 1, there is no workaround.
https://connect.microsoft.com/VisualStudio/feedback/details/1623363/error-command-line-error-exception-handling-option-can-be-used-only-when-compiling-c
C++ is usually not used in kernel mode drivers because it is not supported.
I see this same issue with VS 2015. Just create a blank C file in your project and you will see the intellisense (~) at the first column of the first line. This means intellisense is essentially broken for all C source files now.

Netbeans 7.4 - exclude LESS partial source files from compiling to css

This is mostly a nuisance problem (creating clutter in my css directory). I want to know if, in Netbeans 7.4 (or 8.0 beta?), there is any way to tag a LESS file to no be compiled on run/save.
I have a library.less and vars.less file that are .mixins and #variables that get used site-wide in several other less files as includes but don't need to be compiled themselves as they produce effectively empty CSS.
I'd like Netbeans OR lessc.cmd to ignore them if possible. Is it something that can be done?
According to the test suite, editing and saving a partial should trigger a recompile for the parent file with the #include, but it doesn't say anything about excluding the partial itself from preprocessing. My experience is similar to yours.
There's a bug report for the feature here:
https://netbeans.org/bugzilla/show_bug.cgi?id=239593
Annoying because the feature was requested back in December 2013, and 8.0 was released in March 2014.

What have you done to customize your IDE? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
What tweaks / addins / themes do you have rigged up to make your IDE awesome? For example, in Visual Studio I color themes, CodeRush draws lines between braces, I always install and use the Consolas font and I have it setup to sync my settings across computers for when I change hotkeys and whatnot with the help of FolderShare.
Also, this isn't Visual Studio specific, please feel free to mention what you do with Emacs or Eclipse or whatnot as many of us use a few.
ReSharper 4.1 for Visual Studio 2008. It's a beautiful thing. It looks for all kinds of code errors, optimizations, etc. My code is cleaner thanks to this handy Visual Studio plugin.
Optimizing the IDE will be the first step. Resharper helps a lot but sometimes some simple macros are more than enough.
First things first. Change the font from the default crappy one. Then start fiddling with the 'Options' dialog box.
At the recommendation of a friend, I installed Visual Assist for Visual Studio 2008 -- it is awesome. I swear it can read my mind.
[Note: I have no affiliation with them -- just a very happy customer]
I've done a lot, but I really shouldn't have. So in the last few years, I've toned down the number of macros, custom key mappings, custom toolbars, etc. For the most part, I'm of the opinion that developers should get used to the default behavior and appearance of their IDE. Then when you need to work on your colleague's machine, you still know how to get around and manage to help them out. Not to mention that a whole slew of customizations will get broken or rearranged or otherwise reset when an update comes out.
That said, there are a few things that I still do every time I set up an IDE to work on... for example, setting the number of concurrent builds in Visual Studio to be 1, because that feature is so broken that nothing will compile correctly with any greater setting. Apart from that, being an ace with the default behavior will ultimately make you more efficient than spending hours tweaking the software to make it just a little more fluid.
I like CodeSmart VB6 and CodeSmart VS.NET from Axtools http://www.axtools.com/
for advanced syntax highlighting, drawing lines between parts of If..then..else..endif, Do While ... loop and all other constructs. It also has great code auditors and many add-in functions.
Vi plugin!!
I use Emacs. My .emacs file is only a few hundred lines long, but does customize settings based on my machine's hostname and operating system, so that I can use the same config file pretty much anywhere.
Colorization - Custom - White Text on GreyishBlack, Consolas Font
HotKeys - CTRL+SHIFT+ALT+Z (Attach to Process) probably some others too...
Addins - DPack, Coderush, GhostDoc.
Toolbars Off
All Windows set to collapsed
I am not doing presentations with this machine - If I was it would be barebones.
eclipse plugins make my ide exactly the way I want it of course.
eclipse plugin central
I kinda like the default setup of VS, I only make sure about Consolas as the editor font, and tabsize 2 (tabs to spaces), and change the color of numbers (red).
For Java development using Eclipse I have a few plugins that are indispensable. The MyEclipse Workbench adds a lot of functionality to most of the built-in modules. It makes it very easy to deploy an application to multiple application servers, and enhances a lot of the built-in editors. The PMD plugin is great for searching for potential code issues. As mentioned in a previous post today, the Ganymede plugin really helps to highlight log entries.
I dont care much for fancy visual addons, so I left my IDE (Visiual Studio) in the standard look (other than MS Reference Sans Serif font).
I usually change the color scheme to have a black background instead of white.
I use the Zenburn color scheme with Proggy Clean for a font. It's like a comfy chair for my eyes.
Nothing. I hate dealing with all the breakages that inevitably result from updates, etc. So, I adapt myself to my IDE instead.
I've using a combination of ViEmu and ReSharper with a dark theme.
Oh, and I also hide most of the toolbars and turn off the animations to try to speed things up.
Silver background, 8pt Consolas, disable all toolbars and set tab spacing to 3 spaces. :)
For Visual Studio
Most important - Resharper - I bought my own copy so I don't have to badger my employer about it.
Change the colourisation/font - choose whatever suits you
Optimisation (vote up Gulzar's post with the link in it)
Don't try and make the IDE do everything, just because you can. (Kind of ironic seeing I use emacs as well). I personally really dislike integrated source code management.
Change some defaut file associations so double clicking certain file types doesn't kick off Visual Studio
Aside from Resharper I've actually found most other beneficial thing is not customising the IDE, but customising yourself to learn the keyboard shortcuts. Start with the big gains like Ctrl -, Ctrl Shift -, Ctrl Shift V, Ctrl Alt L etc. etc. and then gradually learn the rest of the shortcuts in order of how often you'd use them
Rather than customizing the IDE, I customized my error messages. I have a macro that expands to a #pragma warning statement that generates a compile-time message in the same format as MSVC++. Visual Studio can parse the resulting warning, so a double-click on the message opens the offending file in the IDE and takes me right to the line in question.
I've used the macro:
To "bookmark" a section of code, so developers will be nagged to fix it each time they build.
Within #if blocks to test for various compile-time conditions.
In headers, to see who #includes them, and where.
From vim you can set the makeprg (make program) variable to a command that will build your project, and the errorformat variable to a scanf-style string that describes the format of the build errors. From there:
:make will build your project
:cl lists all of the errors that match errorformat
:cc takes to you the current error
:cn takes you to the next error
:cp takes you to the previous error.
Out of the box, vim sets makeprg and errorformat to work with make and gcc, and all of the commands are documented within vim's built-in help.
I do Java development in Eclipse. Here are some of the plug ins I find useful:
Mylyn - hides project elements not relevant to the current context.
eUML2 - UML editor.
FindBugs - Static analysis tool to find common bugs in Java.
Crap4J - Another static analysis tool.
EclEmma - Code coverage plug-in for unit tests.
Edit: I forgot one:
Disable the spellchecker. :)
In visual studio 2005 I do these:
Bind F11 to fullscreen mode
Enable a vertical line at 80 characters: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor\Guides = "RGB(196,196,196) 80" (Guides won't be present in the registry.)
Add the "Start Debugging", "Break All" and "Stop Debugging" buttons after the "Help" menu.
I am using Vim Cscope plugin.
Cscope is like 'ctags' on steroids and makes traversing code much easier.
I usually use it along with tags to find where a function is declared and then go directly to whatever code is calling this function.
I also use Vim's Rgrep plugin (recursive search) to search for files in the code hierarchy.
Create some basic macro such as printing bug fix code comments:
Public Sub WriteBugFix()
Dim TS As TextSelection = DTE.ActiveDocument.Selection
TS.Text = "'Edited for Bug Fixed By JK - " & Date.Now.ToShortDateString
End Sub
(This answer assumes the workstation is a GNU/Linux computer.)
Emacs makes an excellent IDE specifically because it can be greatly customized.
You customize Emacs by editing the .emacs file in your home directory. My .emacs is a symbolic link:
$ ln -s /home/bzimmerly/bin/emacs/emacs24/wbz.emacs.el .emacs
Since Emacs offers a variety of specialized major modes for program development and debugging, you can easily "roll your own" IDE design that works best for you. For example, when I'm programming in C or assembler, I like to have the left side running GDB mode, with the right side displaying the source being traced.
A little bit of LISP skill goes a long way to turning Emacs into a very powerful IDE. It is well worth the investment of time to learn how to use this powerful tool!
Finally, tools like Youtube are valuable places for learning how to do this. Just entering "Emacs as an IDE" on the Youtube search form will show videos of how people have modified Emacs for just such a purpose. There are videos on editing Python code, Javascript, Java, C, etc.