Questions tagged [linux]

For questions specific to the Linux operating system.

Filter by
Sorted by
Tagged with
4
votes
2answers
464 views

how to stop vim suspending when using gx

When I press gx over a link in vim, it opens it in an external application, when it does this it also suspends Vim. How do I prevent it from suspending Vim, so that I can use Vim while browsing ...
0
votes
2answers
161 views

Open file at specified line number and automatically put that line in the middle of the screen?

How can Vim be configured to automatically centre a specified line number (eg. without manually having to use the zz command? So from the commandline I just want to issue: vim verylongfile.c +932 .....
2
votes
1answer
844 views

:vsplit does nothing, sometimes

In a specific context, typing :vsplit does nothing. Typing :split still splits the screen horizontally. And if I open a new file e.g. vi foo.txt then :vsplit works. EDIT: steps to reproduce Type /...
1
vote
1answer
98 views

Check if running in a 32 or 64 bit machine

I would like to do a check like if system($(uname -m | sed 's/x86_//;s/i[3-6]86/32/') == 64 Plug 'valloric/youcompleteme', { 'do': './install.py --all' } else Plug 'valloric/youcompleteme', { ...
1
vote
0answers
61 views

How to find out the default system copy register? [duplicate]

I want to know how to find the default copy register on any machine. I ssh into different machines and use vi. But on some of them the "+ and/or "* registers don't work. Also when I can use my mouse I ...
4
votes
1answer
15k views

Change a font in Vim/GVim in a simple way

I merely want to change a font in Vim/GVim. That's it. This doesn't work: font=Monaco\ 14 I've done a google search and I wonder, why is for such a elementary task there's no simple answer which ...
2
votes
2answers
968 views

How to filter text matched by global command?

I have a log file full of arbitrary lines, interspersed with some lines which are a proper xml sequence, with all the tags on a single line (for each sequence). I want to simply process this so that ...
2
votes
1answer
1k views

How to pause (with message) during .vimrc startup?

How can I reliably print a message and pause during processing of .vimrc? I'm using vim 7.4 (not gvim) on Linux Mint. The input() function behaves erratically as shown below. The redraw function ...
1
vote
1answer
313 views

How to create user command without a capital letter as first letter?

I know I can set user-defined commands using the :command Foo bar syntax, but I want a way to set a command without using capitals. For example, to save all open buffers, the command is :wa, but that'...
0
votes
1answer
100 views

What is clipbrdDefaultReg

Taken from here: https://stackoverflow.com/a/171558 What does let g:clipbrdDefaultReg = '+' mean?
1
vote
2answers
738 views

How to execute xdg-open from NERDTree in Linux?

Netrw able to execute file with xdg-open by pressing x, how about NERDTree ? [Response to downvote] If xdg-open can so easy/direct to work (which is the reason of downvote), then what's the point ...
0
votes
1answer
84 views

Please recommend video course (paid or free) or books to use vim like professionals and save my time [closed]

I know that best way would be by doing and practice. But sometimes you learn in a wrong way, so what courses on YouTube or other paid websites or books you would recommend for who is starting with vim?...
2
votes
2answers
388 views

Source a vimrc from a webpage?

I work with lots of different servers and would like to unify my vimrc across them all. I see that vim has the source command, which I'm assuming works similar to bash. In bash, to source a file from ...
3
votes
1answer
231 views

How to escape filename containing single and double quotes mix?

Let's say i create a filename with this: xb@dnxb:/tmp/test$ touch '"i'"'"'m noob.mp4"' xb@dnxb:/tmp/test$ ls -1 "i'm noob.mp4" xb@dnxb:/tmp/test$ Then vim . to go inside Netrw directory listing. " ...
16
votes
1answer
13k views

How to change the space between lines in vim?

I'm wondering whether changing the space between lines is possible. How can I change "Line spacing"?
7
votes
2answers
2k views

gvim window looks bad

I don't know why my gvim windows looks like this in linux. Is there anything I need to add to my vimrc file in addition to this? execute pathogen#infect() syntax on filetype plugin indent on set ...
12
votes
7answers
13k views

how to change python interpreter used by jedi-vim

I have Anaconda (including python3.5.2), VIM (7.4) and Jedi-VIM installed on my system. There was also a python installed on the linux system by default. The autocompletion is working on base ...
0
votes
1answer
3k views

Python integration in Vim on Raspberry Pi

I am relatively new to programming, and I built a mobile computer with a Pi at its heart to learn on the go. Ideally, I would use Vim as my IDE for Python 3. However, every attempt at installation ...
3
votes
1answer
3k views

Backspace inserts “^?” in vim

I'm using vim editor in linux and every time I type backspace it inserts a "^?" instead. I DID edit the .vimrc file to include backspace=indent,eol,star but it did not help. I also tried backspace=2 ...
1
vote
0answers
337 views

Open file in a new instance of vim from nerdtree

I'm actually using i3wmw so I'd like NERDtree, or any other option that works as a file tree to open the selected file in a new instance of vim, instead of in a new tab/buffer. Is there anyway to ...
2
votes
3answers
868 views

No echo command?

I tried doing the following command on a new install of Ubuntu and got a "Sorry, command not supported on this version message": :echo @% How could any version of vim not support echo? The reported ...
5
votes
1answer
1k views

Weird vertical bar to left of line numbers

Couldn't find anything on this by searching, so hopefully it's not super obvious. Every now and then, through some accidental sequence of keys, a solid bar appears to the left of my line numbers. I ...
1
vote
1answer
267 views

Vim not displaying deleted text correctly in tiling WM

I'm sorry if the question doesn't make much sense, but I really don't know how else to describe it. I'll do my best to clarify. Let's say I have a text file containing the words here is some text ...
3
votes
1answer
416 views

How can I securely restrict vim access to a single file?

So first, I realize that this question is slightly out of the ordinary for this site. I will explain the backstory to avoid the XY problem. Over on Programming Puzzles and Code Golf, lots of users (...
6
votes
1answer
930 views

How to use a specific vimrc file and still load the usual files?

I'd like to automatically set my Vim preferences on the root account, when I use it (throught a sudo bash or sudo su-like command), without changing the default configuration of the root account (...
1
vote
0answers
459 views

linux: yank to clipboard, cut to primary

I'm using neovim. I want to map the 0 register to the system clipboard and the unnamed register to the system primary (mouse middle click). Is it possible? I can map the unnamed register to primary ...
4
votes
1answer
2k views

How to debug a segmentation fault?

I assume this is coming from a Vim plugin, but I get no leads on where to look. What's the best way of debugging it? Vim: Caught deadly signal SEGV Vim: Finished. [1] 8119 segmentation fault
4
votes
1answer
4k views

Using vim-addon-manager

I just downloaded and installed vim-addon-manager using sudo apt-get install. I'm not sure what to do next, I entered vim-addon-manager at the bash prompt (Ubuntu 14.04). Here is the output: ~$ vim-...
2
votes
3answers
5k views

How do I turn Vi colors off in Ubuntu Linux 14.04

How do I turn vi colors off? I was using vim-tiny on on Ubuntu 14.04. Installed vim-nox. Version is version 7.4.52. Once I installed that, I got all these syntax colors by default. I have my Terminal ...
2
votes
1answer
90 views

Is it safe to open encrypted/sensitive text files from a zip archive with vim/gvim?

I have an archive which contains encrypted text files with sensitive data. Is it safe to open them with vim/gvim? I'm afraid vim/gvim will leave content of the files on the drive/memory even after I ...
4
votes
1answer
1k views

Why does gvim read /usr/share/vim/vimrc instead of ~/.vim/vimrc

:help startup states, under 3. Execute Ex commands, from environment variables and/or files that (for Unix systems) $HOME/.vimrc or $HOME/.vim/vimrc is read and that The files are searched in the ...
4
votes
1answer
49 views

Why does spell-check work poorly on my system?

I'm using VIM7.4.488 on ubuntu 15.04 system. I use command :setlocal spell spelllang=en_us for spell checking. It can capture some spelling error as well as words like htb, Cref, iffalse. However, it ...
8
votes
2answers
4k views

How can I build vim with just python 3 support?

I'm on Arch, and recently the vim-python3 and gvim-python3 packages were removed, so I'm working on building vim from source such that the :python command will act as python3. Specifically, I'm doing ...
4
votes
1answer
555 views

Understanding :help set-termcap

I would like to define some mappings involving key combinations like <S-F1> or <A-d>. For example something like this: nnoremap <A-d> :echo "hello world!"<cr> However, on my ...
13
votes
1answer
1k views

How to use backtick-expansion to populate the arglist?

From help :help backtick-expansion: On Unix and a few other systems you can also use backticks for the file name argument, for example: :next `find . -name ver\\*.c -print` :view `ls -t *....
5
votes
3answers
1k views

How do I open file under cursor, when the filename has a trailing dot?

There is a file with name ./folderA/folderB/file.. And there is text: ./folderA/folderB/file.:abcdefg When I move the cursor on letter B and type <c-w>f, it says E447: Can't find file "./...
12
votes
1answer
2k views

Spell mistakes have weird coloring

I am using spell checker in vim, and I find one feature very annoying: errors are being highlighted with some weird color, which is nowhere to be found in gnome terminal settings: I would like to ...
4
votes
1answer
3k views

How to redirect the output of a command as the quickfix list to a vim server / function?

When I click on a link in thunderbird and firefox is already running, it doesn't open a new window, just a new tab. I want the same thing for vim: no matter where I am and how I send a bunch of files ...
2
votes
1answer
131 views

ubuntu & haskell : problem with haskell-vim-now

I just installed haskell-vim-now from this site ( here ) but when I launch vim and I enter text, such as an hello world haskell example, no code colors are displayed, nor completion : I wonder if ...
0
votes
1answer
632 views

On Ubuntu and in tmux, vim does not react to Ctrl+Home and Ctrl+End

Outside of tmux they work well. These key combinations should move the cursor to the beginning of the document and, respectively, to the end of the document. How do I make them work? Thank you very ...
10
votes
3answers
2k views

How to delete till the end of the previous line?

An example (The ^ is the cursor position): Before: a bc def ghi j k l mn o p q rs ^ After: a bc def ghimn o p q rs ^ or at least: a bc def ghimn o p q rs ^ I know I ...
2
votes
1answer
823 views

The right shebang for Vim to parse the file from the argument?

I'm following the page where there is an example how to set-up Vim as a system interpreter for vimscript by setting the following shebang line: #!/usr/bin/vim -nNesc:let&verbose=1|let&viminfo=...
5
votes
1answer
61 views

What are the methods of speeding up parsing of a big file using Ex?

I did recently some performance test where I've created artificially 1GB of random text file by: $ hexdump -C /dev/urandom | rev | head -c1G | pv > file which has around 13mln of lines starting ...
2
votes
1answer
366 views

How to print a multi-line match?

I've a file where I would like to extract a multiline pattern in non-greedy way (similar to this scenario) by using ex editor. This example works fine: $ ex +'/aa/,/cc/p' -scq! <(echo -e "start\...
3
votes
3answers
1k views

How to show all unsaved files opened in vim?

I'm not sure if I should ask this problem on vim or on Linux/Ubuntu forum. The thing is, I opened multiple terminals on my desktop, and several of them opened various of *.txt files. Not all of them ...
1
vote
1answer
161 views

Wrapper script for vim --remote

I need to set on my Linux box VIM as default mime application for editing text file. On zsh I managed to wrap a function from vim --remote. But I would like to use it for default xdg-mime application ...
0
votes
1answer
1k views

Why does vim create a new file when opening an existing file?

First and foremost, I'm using Arch Linux. I have a file dir/data.tex. I execute this command in terminal (when in the dir directory) $ vim data.tex I get the following output: "indent" [New File] ...
2
votes
1answer
628 views

Remapping F1 on vim-gnome

I want to use F1 in vim-gnome* on Ubuntu 14.04.2. But when I press F1 I get Gnome "help". It's stopping me from remapping F1 to something useful. Searching reveals that the trick is to use dconf to ...
13
votes
5answers
19k views

How to copy across terminals?

I'm using Linux system. Two vims are opened in two terminals. Now I'd like to copy text from A to B. One way to do so is to select text in A, use mouse to copy, then switch to B, in the insert mode, ...
5
votes
1answer
2k views

Why does `set nocompatible` result in vim saving extra, all-numeric temporary files?

I've narrowed down a bug in a program I'm working on to (surprisingly) some vim behavior! The program contains a file watcher. When I write a file with vim -u NONE and all the default settings, the ...