How to disable wrapping lines in nano? - line-breaks

My nano did not wrap long lines automatically at first, they just kept going. I do not know what I did but now the automatic wrapping is enabled.
I want to know how to reconfigure nano to disable automatic line wrapping, this has bothered me a lot.
I've seen the nano -w command that it comes without wrapping, but what I want is to disable it by default and run nano without having to worry about wrapping.

To change persistent settings for nano, we can edit the user-specific .nanorc file (/home/user/.nanorc). This file contains configuration settings that nano loads on start-up.
To disable line-wrapping, we need to specify the nowrap directive. Add this line to .nanorc:
set nowrap
We may need to create this file if it doesn't exist. For more information about the available settings in this file, see the .nanorc man page:
$ man nanorc

For others like me that hit this question from google and only want to disable wrapping temporarily, press EscL.
That toggles "Hard wrapping of overlong lines".

Related

How to make Vim format C++ code automatically as I type

I have setup clang-format to reformat the current line/selection when I press Ctrl-K in Vim (see the official documentation how to do that). However, it's annoying to be constantly pressing Ctrl-K whenever I edit a line.
Is there a way to make Vim call clang-format as I type or edit code automatically, without me having to press Ctrl-K? In other words, probably after each key stroke in insert mode?
I haven't seen anybody setup vim this way --- what are the potential problems with this setup?

Coldfusion cfprint and UPS labels

I am trying to use Coldfusion CFPRINT to print UPS labels to a network printer. The starting labels (png files) are great and I can print them locally to the zebra printer and they print and work wonderfully. The barcodes produced by CFPRINT however are of such poor quality that a barcode scanner cannot read them. My research shows that Coldfusion uses the jpedal java library which resizes the images to 72 dpi - which is just not crisp enough for a scanner.
I read about using a jpedal setting: org.jpedal.upscale=2 but I have no clue as to where you would utilize this.
Any suggestions on how to fix this CFPRINT resolution issue using Coldfusion?
(Just to add a bit more detail to the comments)
That is a JVM argument. There are several ways to apply it:
Add the setting to your jvm.config file manually. Backup the file first. Then add -Dorg.jpedal.upscale=2 to the end of the java.args section. Save the changes and restart the CF Server. Do not skip the backup step! Errors in the jvm.config file can prevent the server from starting. So it is important to have a good copy you can restore if needed.
Open the CF Administrator and select Server Settings > Java and JVM > JVM Arguments. Add -Dorg.jpedal.upscale=2 to the end of the arguments. Save the settings and restart the CF server.
Again, I would strongly recommend making a backup of the jvm.config file first. As #Mark noted in the comments, some versions of CF have been known to mangle the jvm.config file, which could prevent the server from starting. But as long as you have a good backup, simply restore it and you are good to go.
IIRC, you could also set the property at runtime, via code. However, timing will be more of a factor. Their API states system properties must be set before accessing JPedal. The docs are not clear on exactly what that means. However, the implication is the system property is only read once, so if you set it too late, it will have no affect.
// untested
sys = createObject("java", "java.lang.System");
prop = sys.getProperties();
prop.setProperty("org.jpedal.upscale", "2");
sys.setProperties(prop);
Side note, I was not familiar with that setting, but a quick search turned up the CF8 Update 1 Release Notes which mention this setting "improves sharpness, but it also doubles the image size" and also increases memory. Just something to keep in mind.

how to compile/jump-debug using cmake/gcc within vim

I currently use vim/byobu-tmux to multiplex between a command line (cmake/gcc) and a vim session.
Is there a way to do the following directly within the vim session?
Compile within vim (I currently use a cmakedbg bash alias in a command line/bash session)
Jump to files/location where the compile has failed
all within vim, that would save me a lot of time.
Did you try
set makeprg=cmakedbg
Then
:make
should compile and if it fails it should automatically jump to the error (while :make! would compile without jumping to the error). This works usually, but might need some tweaking depending on the setup.
If you need to source .bashrc before cmakedbg works, you can make the shell interactive by
:set shellcmdflag=-ic
However, I always had problems with that. I know it's working for some people, but when I try that, vim is stopped by the interactive mode. I can get it back by typing fg, but that's not what I want.
I think the best way to do it is to set up a function in vim and do it without .bashrc.

Webstorm: save only open tab vs. save all tabs?

I'm new to webstorm since I started my latest job, and I'm finding some features difficult to adapt to. In particular, the fact that it forces you to save all open changes in all tabs at once is problematic.
I have a somewhat organic method of development, swapping between HTML and LESS frequently until I reach a point where I want to save the files and see what my work has accomplished. Whenever I save an open HTML doc, it saves the incomplete LESS that I just left mid-thought as well, and pops up a compiler error. Is there any way to force webstorm to only save the active tab?
(Aside: Please don't suggest I adjust my mindset or my workflow to adapt to my environment. Not only is that poor usability, it would require me to override an instinct that was developed for good reason: when you reach a milestone, you save it lest something bad happen. Leaving an unsaved doc open makes my eye twitch.)
This has been (sort of) implemented in v7.0. You'll need to dig into Settings > Menus and Toolbars to add "Save Document" to the program menu, and Settings > Keymap if you want to assign a keyboard shortcut (and disable Ctrl+S for Save All).
You may also want to tick "Mark modified tabs with asterisk" under Settings > Editor > Editor Tabs.
Note: You will not be warned if you exit without saving your changes.

How to store the Visual C++ debug settings?

The debug settings are stored in a .user file which should not be added to source control. However this file does contain useful information. Now I need to set each time I trying to build a fresh checkout.
Is there some workaround to make this less cumbersome?
Edit: It contains the debug launch parameters. This is often not really a per-user setting. The default is $(TargetPath), but I often set it to something like $(SolutionDir)TestApp\test.exe with a few command line arguments. So it isn't a local machine setting per se.
Well, I believe this file is human readable (xml format I think?), so you could create a template that is put into source control that everyone would check out, for instance settings.user.template. Each developer would than copy this to settings.user or whatever the name is and modify the contents to be what they need it to be.
Its been a while since I've looked at that file, but I've done similar things to this numerous times.
Set the debug launch parameters in a batch file, add the batch file to source control. Set the startup path in VS to startup.bat $(TargetPath).