150 questions
0
votes
2
answers
55
views
How do I use keyboard shortcuts starting wtih <C-c> in Vim?
I'm trying to use python-mode with Vim and a lot of the commands are by default bound to things like '<C-c>rm'. What does this mean? Ctrl+c just exits the current mode, so in normal mode it does ...
0
votes
2
answers
40
views
How can I calculate time correctly?
*Here is my code *
I want get ühole number
from time import time
import math
start=time()
total_time= 30
while time!=0:
move=input('Chess move:')
if move !='off':
print(start)
...
-3
votes
1
answer
91
views
Which Module do I use In python to browse, Copy and paste Files in Directories [closed]
I want to add a function in my program that when called , opens a browsing window like ones that open when you click on browse to change directory location in a setup. I want it to let me browse ...
1
vote
0
answers
105
views
How to check which env activated in anaconda-mode
I use purcell/emacs.d configuration. When coding with python, I use following command to activate an env, with anaconda-mode.
M-x pythonic-activate RET /path/to/virtualenv RET
But nothing changes in ...
2
votes
0
answers
52
views
Duplicate Python Source Code Window in Emacs python-mode
I am using Emacs 27 with Evil mode to write python code.
Every time I do M-x py-execute-buffer, the python source code was duplicated in a new window while the python shell runs. So Emacs would end up ...
2
votes
1
answer
2k
views
Tabs and Spaces in emacs python-mode / elpy
This has been an exquisite exercise in frustration. For some reason, my python-mode / elpy buffers always have intent-tabs-mode nil. I'm using python-mode 6.2.3, elpy 1.32.0, and emacs 25.2.2. My ....
0
votes
1
answer
131
views
Can't jump to line in pyflakes quickfix window
I recently installed the vim extension python-mode, which includes pyflakes. When I save a python file to disk, pyflakes automatically detects errors and style violations and displays them in a ...
0
votes
2
answers
1k
views
updating pymode repository error: server does not allow request
I run the following command:
git submodule update --init --recursive
I got
error: Server does not allow request for unadvertised object 837ecd3d7a8597ab5f28bc83072de68e16470f1e
Fetched in ...
1
vote
1
answer
265
views
pymode error detected while processing pymode#run#code_run
After installed vim-plugin Pymode, at first, I can successfully run my python code in vim. But after a while, there is something wrong like this:
0
votes
0
answers
339
views
How to set python-mode so linters check for python 3 versus python 2 errors
To All,
How do I set python-mode so the linters check for Python 3 versus Python 2 errors depending on if I am editing a Python 3 or a Python 2 file? After the last update of python-mode, the ...
0
votes
1
answer
1k
views
python module import error - python-mode [VIM]
I am trying to import a module from another directory and run the script using python-mode. I am encountering, module not found error, but the module is present in the location and my sys.path shows ...
0
votes
0
answers
559
views
Python-mode's linters not working on 4 vim installations
Too All,
I cannot get python-mode's linters to work on 4 vim installations.
On 2 PC's running Windows 10, and Python 2.7.14, I upgraded from vim 7.4 to 8.1. Steps as follows for vim 8.1:
mkdir C:\...
0
votes
1
answer
667
views
Not an editor command: RopeGotoDefinition
I'm working with a fresh install of python-mode (installed with Vundle on Vim 8) and find that "go to definition" mapping never works no matter how I set g:pymode_rope_goto_definition_bind.
Then I ...
1
vote
2
answers
247
views
Quickfix Location List linter window stays open
I love the linters and the quickfix window, but on occasion I don't want to fix anything and simply want to exit the file. The current issue is that when I close the file, the quickfix window stays ...
1
vote
0
answers
107
views
vim pymode - sort lint errors and warnings by significance
I was wondering if there is any way to have errors always appear before PEP-8 warnings in the lint output?
Either of re-ordering the output or having PEP-8 and other style warnings only reported if ...
1
vote
1
answer
1k
views
Vim pymode throws "invalid syntax" error on async function definition
I'm currently developing some async python in vim and have pymode installed as a plugin. But I'm having an issue with file linting because the linter gets hung up on the first (and valid) async ...
0
votes
2
answers
895
views
How do I minimize code view in vim after switching to insert mode
An opened .py file in minimized view.
After navigating to a class and switching to **insert mode**
If I want to view the code details I just navigate to the method or class I want and switch to ...
1
vote
0
answers
598
views
In python-mode plugin NameError: name 'pymode' is not defined
I have just installed the python-mode plugin by vundle
deal with /home/lucas/.vim/autoload/pymode/doc.vim gets error:
line 3:
Traceback (most recent call last):
File "<string>", line 1, in &...
0
votes
1
answer
1k
views
If you change a global variable in a vim plugin (python-mode) and reload it, isn’t it equivalent to just loading the .vimrc at startup?
Using Vim version: 7.4
In this line of the Python-mode documentation: https://github.com/python-mode/python-mode/blob/01c3131343aaa3c76f8cb656b5e9f54ac90ca04b/doc/pymode.txt#L234
it says that I can ...
0
votes
3
answers
1k
views
Disable automatic (preview) window (buffer) with a function signature
Every time I click dot, the function signature appears in a separate buffer.
import sys
sys.argv # in this moment I have a separate buffer opened with sys.argv signature
Then this buffer exists ...
7
votes
2
answers
9k
views
Vim getting indentation wrong for Python code (with the python-mode Plugin)
As shown in the following screen-cast, I demonstrate the strange behaviors of Vim when it comes to adding comments to Python code. Between Demo 1 and Demo 2, I was only starting the line of comments ...
1
vote
1
answer
645
views
How do I prevent automatic re-folding of python code after refactoring using vim with python-mode / rope and SimpylFold
I am using vim to create and edit python code. I have python-mode installed which provides (amongst other things) refactoring via rope. I also have SimpylFold installed to provide code folding.
...
1
vote
1
answer
211
views
How can I eliminate vim python-mode's 'Call' object has no attribute 'starargs'
The complete spurious warning is:
equivs3e|1 F| F0002 <class 'AttributeError'>: 'Call' object has no attribute 'starargs' [pylint]
I gather it's got something to do with the new AST code in ...
0
votes
1
answer
471
views
How can I turn off vim python-mode's mccabe completely check for just one function?
Title pretty much says it, but just to be sure:
I'm not looking for a way of turning off the mccabe check for all callables (functions, methods), just for specific callables I've decided have a good ...
1
vote
0
answers
288
views
quit code checker when when quitting vim
I'm using vim with python-mode plugin. When I quit vim with wq or q, the code check on the bottom doesn't quit. Just wondering if there is a config for quitting code check when vim quit? Thanks
3
votes
1
answer
2k
views
Vim (python mode) Breakpoint
I use Plugin 'klen/python-mode' in my vim, and work fine
but when I want add a break point and run code with python mode, occurs unexpected error, the vim says [Pymode] code running ... and vim is ...
0
votes
1
answer
351
views
How to launch python-mode on a buffer with vim?
I've just installed python-mode for my Vim, but I can't figure out how to run it on an open buffer, without saving the buffer as a .py file. Only way I can run python-mode seems to be by opening a .py ...
4
votes
2
answers
3k
views
How to stop debugging python in vim
It is my first time to edit python code in vim equipped with python-mode plugin. After setting breakpoints, I use "\ r" command to run it.Then it keep still after printing '[pymode]code running...'.I ...
0
votes
2
answers
764
views
How to prevent Python-mode from auto inserting "import"?
I use Python-mode (pymode) in Vim. When I begin typing an import statement,
from foo import bar
Pymode auto inserts import such that I end up with
from foo import import bar
How can I prevent ...
1
vote
1
answer
2k
views
Emacs python-mode file mode specification error
I am using GNU Emacs 24.3.1 (i386-mingw-nt5.1.2600) of 2013-03-17 on MARVIN on a Windows 7 Enterprise, SP1 machine.
I have tried to install python-modevia ELPA, but got the following message in the *...
0
votes
1
answer
169
views
py-execute-line sends the whole buffer to the python process
I started to play with python-mode in Emacs (latest Emacs, latest python-mode.el)
When I try to send of line of code to the process via py-execute-line or send function definition via py-execute-def-...
1
vote
1
answer
997
views
Q: Set python indent to 2 spaces in emacs 24?
I did what it said in this very helpful thread on how to it in Emacs 23, but it wouldn't work. The indent level keeps on being 4 (the default).
I am on a Mac (MacOS 10.8) using Emacs 24.3.
2
votes
1
answer
130
views
history across sessions in ipython using python-mode.el in emacs
How would I save history across sessions in ipython using python-mode.el in emacs. To be sure this feature works when I run ipython at the command prompt rather than from within emacs
Thanks.
python-...
0
votes
1
answer
171
views
emacs 24.5 python-mode (stock version Vs 6.2.1)
I have discovered an issue with python-mode in emacs. I generally c++ develop and seldom do python.
I have recently discovered this issue:
I emacs –Q
I open a python file
It contains:
import re ...
0
votes
1
answer
342
views
How to change the default pdb command format in emacs?
In python-mode when I edit a python file, if I type in M-x pdb, it will show
Run pdb (like this): pdb filename.py, but it doesn't work, I will have to change it to python -i -m pdb filename.py. I hope ...
1
vote
1
answer
1k
views
quickfix window in vertical split with maximum height
I have recently started using vim plugins and was trying to setup python-mode with pep8. I wanted to see split the window vertically. I was able to achieve it using autocmd commad as :
:autocmd ...
1
vote
2
answers
979
views
Emacs24 and python-mode: indention in docstrings
I have the following code/text:
def f():
"""
Return nothing.
.. NOTE::
First note line
second note line
In Emacs23 (23.4.1) I was able to press TAB in the last line ("second ...
2
votes
1
answer
2k
views
Vim pymode: meaning of <C-c> key combination
I have come across the following key combinations(...i assume) in vim pymode documentation. <C-c>, <C-C>, <C-X><C-O>, <C-P>/<C-N>. How are they to be interpreted?
0
votes
1
answer
85
views
Why doesn't button-lock-mode work with python-mode in Emacs?
I'd like to have clickable links to JIRA tickets in my Python code from within Emacs.
For example, I use doxygen docstrings in my integration test code, which links a ticket number:
def ...
0
votes
3
answers
2k
views
configuration of .emacs to use IPython interpreter
I am new to lisp and having hard time configuring emacs for ipython. Part of my .emacs file looks like this:
;; Python mode settings
(require 'python-mode)
(add-to-list 'load-path "~/.emacs.d/elpa/")
...
3
votes
3
answers
5k
views
VIM + netrw: open multiple files/buffers in the same window
I have recently switched to VIM using NERDTree and python-mode. As NERDTree seems to have a conflict with python-mode and breaks my layout if I close one out of multiple buffers, I decided to switch ...
12
votes
4
answers
28k
views
VIM: Use python3 interpreter in python-mode
I have recently switched to vim and configured it for Python-programming using this tutorial. Before, I have made sure that vim supports python3 (vim --version shows +python/dyn and +python3/dyn) ...
0
votes
1
answer
437
views
Folding body of functions in python with vim
For instance, if I have this function:
def foo():
a = 5
print a
...
If I fold it, I get this:
def foo():
+-- 123 lines: a = 5 ---------------------------------------------
but what I ...
3
votes
1
answer
3k
views
Vim Pymode don't use actual env
After my env is activated, I start vim. In the bottom of the screen I see something like this:
"[Pymode] Activate virtualenv: /home/../envs/test_env"
When I'm trying to run my script, vim use system ...
3
votes
1
answer
369
views
Prevent vim from autofolding when typing
Every time i use snippets in vim while coding in Python i get a problem which i desire to get rid off.
Here is the sequence of steps which leads to my problem:
type fun and hit Tab to trigger ...
1
vote
2
answers
1k
views
Setting default height on vim windows
I am using python-mode with vim and want to have the horizontal splits from the plugin show 17 lines of content.
In my .vimrc I've tried:
autocmd BufEnter __run__ :resize (the difference of the ...
0
votes
1
answer
316
views
vim slows down for autocompop for yaml files
This is my vimrc. The vim is really slow in navigation for yaml files. I disabled the L9 and autocompop plugin and its faster now. Is there way to have have the plugin and still have a better ...
1
vote
0
answers
616
views
Jedi-VIM: Popup appears just in some cases
I installed several plugins to create a kind of python-IDE with vim 7.3 on Mac (Yosemite).
See my .vimrc for a list of plugins - settings:
set nocompatible " be iMproved, required
...
0
votes
2
answers
147
views
Installed python-mode; now I only see class names in my file
I installed python-mode for vim on my Mac OSX system. I decided to try one of the python motion commands. I hit [C which I thought would go to the next class. But the screen also switched, to show ...
0
votes
1
answer
564
views
Vim python-mode plugin picks up system python and not anaconda
When i use python-mode it uses my system (mac python), I have anaconda installed and want Vim to autocomplete etc with that version of python
As it stands now, python-mode will only autocomplete ...