textmate undefined method '+' for nil nilClass (NoMethodError) - textmate2

Can Someone help me find out why textmate not
working with ^+shift+O to open terminal .
When I do this, tm just popup a window saying
Failure running "Open Terminal".
Open Terminal:2:undefined method '+' for nil:NilClass(NoMethodError)
Then I Click Edit Command button, goto Open Terminal shell script
And Find out the following code:
require ENV['TM_SUPPORT_PATH'] + '/lib/escape.rb'
contains the operator +.
I guess that's the problem but don't know how to fix it .
Thank you for your help !!

Related

Getting YcmCompleter RefactorRename shortcut to work properly

I would like to add shortcut for YcmCompleter RefactorRename command. Here is what I have so far:
nmap <leader>yrn :exe 'YcmCompleter RefactorRename '.input('refactor \"'.expand('<cword>').'\" to:')<cr>"
When I press shortcut, I see input prompt, but after I enter new name, operation fails with RuntimeError: Cannot rename the symbol under cursor.
If I run YcmCompleter RefactorRename newname in the same place, it works just fine. There seems to be a problem with my script
How do I get this to work?

Use python, to open cmd window with the directory supplied as an argument as the current directory

I want to use Python to open a directory in a Win10 cmd window, and keep the window open.
I made a batch file named: open_dir_in_cmd_window.CMD:
CD /D %1
I tested that batch file successfully, by creating another batch file named, Test.cmd:
Rem "open_dir_in_cmd_window.CMD" "f:\backup"
"open_dir_in_cmd_window.CMD" "f:\backup"
A very helpful webpage provides the following example, which I seem unable to follow correctly:
Spaces in Program Path + parameters with spaces:
CMD /k ""c:\batch files\demo.cmd" "Parameter 1 with space" "Parameter2 with space""
I made a python script, which contains the following lines, which alas, triggers an error message:
import subprocess
subprocess.run(cmd /k "E:\open_dir_in_cmd_window.CMD f:\backup")
When I open a Command Prompt window and run:
"C:\ProgramData\Anaconda3\python.exe" E:\open_dir.py
I get an error message, SyntaxError: invalid syntax, with this:
subprocess.run(cmd /k "E:\open_dir_in_cmd_window.CMD f:\backup")
^
I've tried many different permutations of double quoting and can't figure out the right way to do it.
I have spent many hours hunting on the web and trying to figure this out and I do not know what to do.
Any suggestions would be appreciated.

How to switch to HoTT-mode for Lean 2 in Emacs

I compiled Lean 2 from the github repository. Then, as instructed in scr/emacs/README.md, I modified my .emacs file, opened a file, clicked on 'Create new project', clicked on 'Open', typed 'hott' and pressed Enter.
Then I typed
print eq.inverse
and I received a message
1:1: print result:
1:17: invalid print command
I also tried the command lean-hott-mode with the same results.
What am I doing wrong?
I've figured it out.
Apparently, Lean requires HoTT files to have the extension *.hlean

call from command line, show file also if the search does not match

I use a msdos-script to search with vim for patterns and show me the result
Script: tel.bat
rem script is called: tel.bat <pattern>
gvim -R %WORKSPACE%\telliste.csv "+set ignorecase" "+set ft=javascript" -c /%1
This works fine if the pattern exist in the file. If the pattern is not matched, I get an error message and I am stuck. No keystroke or mouse action changes the state. Like:
Enter key - has no effect
Esc key - has no effect
Ctrl + C - the error-messages disappears, but the editor is frozen. No action possible
Mouse click in editor - has no effect
I can only close vim and try again. That's what I get as error, when I call the script tel.bat konez on the command line:
Error message translated:
Error during execution of "command line":
E486: Pattern not found: konez
Confirm with the ENTER Key or place a command
How can I work further on the file, even if the pattern is not found? In other words how can I avoid that I am stuck in vim.
I tried already with -c ":execute 'silent !'" in the batch file, but this was not recognized. Perhaps I did it in the wrong way...
This should work, and I cannot reproduce this on Linux with Vim version 8.0.1358; I can accept the error message with <Enter> and continue.
This could be a plugin / configuration issue; try launching with gvim --clean.
The multi-line error message is ugly. You could avoid it by moving to the lower-level search() function:
gvim ... -c "call search('%1')"
By evaluating its return value; you could also craft your own error message: if search(...) == 0 | echomsg 'No matches' | endif

Using goto with user-defined modules in jedi-vim

jedi-vim works very well with modules and functions installed on my system. For example, if I put the cursor on glob.glob() and hit <leader>d, jedi-vim brings me to the definition of glob() in /usr/lib/python/.
However, for a user-defined module where a function is imported with a line like
from mymodule import myfunction
jedi-vim may not bring me to the function definition. It instead gives the message "jedi-vim: No documentation found for that" if the modules is not in the same directory as the file I'm editing. Similarly, typing <Shift>k gives the same error message.
Do you know how to make user-defined modules in a different directory work with jedi-vim?
If you want to solve this from within vim, the right variable to set is PYTHONPATH. See this doc.
So if you add this to your .vimrc
let $PYTHONPATH .= ';' . 'path/to/distant/file/'
then Jedi's goto command also works on the distant file.
The . is the vim script string concatenation.

Resources