How to show the full message rather than truncated one in Vim? - vim

I'm new to Vim. When I use Vim to write Go with vim-go plugin, I found it can mark the statements that go wrong. But what confuses me is that the message on the status bar(or command line?) is truncated and sometimes I couldn't see the whole message. I've tried :messages cmd, and tried to :set cmdheight=5, they just wouldn't work as I expected. Could anyone tell me how to show the full message?

Related

Can't Remove leafgarland-vim TypeScript experimentalDecorator warning

I have the leafgarland-vim plugin installed, and when I save my .ts file, I always get this warning:
I've tried adding let g:typescript_compiler_options="--experimentalDecorators" to my ~/.vimrc, and I've also entered that command from inside vim, after first typing ":". I can even do :echo g:typescript_compiler_options and it returns --experimentalDecorators. Yet every time I go to save I get this error.
How can I get this error to go away? --experimentalDecorators just doesn't seem to do its job.
edit:
I tried this from inside vim:
:let g:typescript_compiler_options = '--dnwejuidbnwejudbn'
And the code still compiled, with the same warning. I don't think the let g:typescript_compiler_options is actually doing anything.
edit2:
edit3:
In the meantime, this hack gets rid of the warning:
I'm guessing but I think you are seeing these warnings from another plugin, probably Syntastic. Syntastic uses its own compiler settings.
You could try adding something like this line to your vimrc:
let g:syntastic_typescript_tsc_args = "--experimentalDecorators"
See :help syntastic-checker-options for more details.

Enable Checking in Syntastic

How would I do it? I've been reading around and I cannot figure it out. Let's say I want to enable syntax checking for C++. How would I do that?
After Installing Syntastic using pathogen or your favorite plugin manager,
By default it will give you highlight the line numbers about error messages.
If not, may be the file might not be detected as correct file type.
Please set the file type to CPP. using the following ex command.
:set ft=cpp
General behaviour is that the error messages will show up after we save the buffer using :w
If you want to manually view the error message suggestions later at any point of time, Use the following command
:SyntasticCheck
More about the global commands of syntastic can be found in help documentation using the following command.
:h syntastic
Hope it helps.

no type information (try :GHGReload)

I'm using haskellmode, a vim plugin, and when I move my cursor over an editor window in the course of typing code, I get a message at the bottom of the window that says:
no type information (try :GHGReload)
When I do:
:GHGReload
I get the error:
Not an editor command: GHGReload
What is that all about? Or, alternatively, is there a better vim plugin for haskell? I should note I get no auto indenting with haskellmode, which I find surprising. In fact, haskellmode doesn't seem to do anything but change tabs to 8 spaces and give me that error message.
I believe the command is :GHCReload not :GHGReload.

How to disable jumping to warning location after compile in vim-latex?

After compilation, vim-latex opens a quickfix buffer, lists errors and warnings, and jumps to the first error or warning in the list. How do I make it not jump for warnings? or better yet, for certain warnings?
If this is not possible, is there some shortcut for returning the cursor back to its position before the jump?
NOTE: Ignoring warnings via let g:TexIgnoredWarnings = ... is not adequate since I do want to see the warnings.
If you're compiling via Vim-Latex's \ll command as I do, then adding the following option in either your vimrc or the ftplugin tex.vim should solve your problem:
let g:Tex_GotoError=0
This will leave your cursor where it was, but still populate the QuickFix window with warnings and errors. The documentation (linked below) says that it defaults to on, so switching it off should accomplish what you want.
http://vim-latex.sourceforge.net/documentation/latex-suite.html#Tex_GotoError
I assume you are compiling LaTeX with the :make command. The help for that command gives a list detailing exactly what the command does, including:
If [!] is not given the first error is jumped to.
If you trigger your compilation with :make! or the abbreviation :mak! instead of :make, then the cursor will not jump.
vim also saves a list of places your cursor has been recently. You can jump back to your previous location with Ctrl-O, and then jump forward again with Ctrl-I Use :help jump-motions to see more about this feature.

Is there a "vim runtime log"?

Sometimes I try a customization/command in my vimrc. Everything seens to be correct, but it just doesn't work.
It's difficult to know what's happening when vim starts, and know which command failed or not, so it's really difficult to debug what can be causing a problem in my vimrc. It's a trial-error approach, which is time consuming and really a PITA. For example, I'm having problems with snipmate plugin in some files and just don't have a clue on how to discover the problem.
Is there a "runtime log" when vim starts, telling which commands it executed, which ones failed and such? This would help me a lot.
running vim with the -V[N] option will do a pretty hefty runtime log, here N is the debug level.
vim -V9myVim.log
would create a log of debug level 9 in the current directory with the filename myVim.log
:messages shows all warnings, errors, and informational messages that appeared (possibly briefly) in the vim statusline.
:echo errmsg prints the most recent error message.
g< is another feature few people know about. From :help g<:
The g< command can be used to see the last page of previous command output. This is especially useful if you accidentally typed <Space> at the hit-enter prompt.
For example try :!ls then cancel the prompt, then hit g<.
Put this function into .vimrc:
function! ToggleVerbose()
if !&verbose
set verbosefile=~/.log/vim/verbose.log
set verbose=15
else
set verbose=0
set verbosefile=
endif
endfunction
Then create directory ~/.log/vim and call ToggleVerbose() to get your log in ~/.log/vim/verbose.log. Note that you may catch «variable nested too deep for displaying» error which will not normally appear just because you have raised your verbose level.
I don't think there is a runtime log, per se, but you can run it in debug mode.
http://web.archive.org/web/20090323034339/http://www.troubleshootingwiki.org/Debugging_Vim_Scripts
This probably goes against everything SO stands for, but here's what I do: I just hit print screen soon as the warning comes up and look at the picture.
I had to add "set nocp" to use "ToggleVerbose()" function when run in root because of &verbose

Resources