Recently I decided to delve into Vim after looking for a new text editor after adopting a Linux distro as a secondary operating system. I've installed Powerline as it seems the norm to do and for about 20 minutes I had it fully working (until I closed Vim), though after that (about a week ago) they failed to appear again (pretty sure they were just separators, not actual symbols - although that coming from me is entirely unqualified).
I've followed just about every fix I could find under the Sun, followed the documentation on font patching etc, nothing seems to be working.
I'm sure it's a stupidly easy fix and I'm just a bit too dull to find it, but hopefully I can fix it somehow as it's really, really bugging me.
Have a good Christmas!
PS. I just registered (I could've sworn I already had an account though apparently not), so I'm unable to post images. But I'll do my best to explain it: On the left of the status bar you have the mode, then next to that it the first symbol error (again, it might not even be a symbol error, I'm just going off what I think was my issue online), it's a rectangle (portrait) with 2B80 in it, after that there's the filename, and immediately after is the very same rectangle with the same code in it. But there are other errors as stated in the title such as 2B83 and 2B61, as well as just 28.
I'd imagine they are supposed to be separators as they're after every segment of the status bar, but I have no idea. I'm stumped.
Thanks for any/all help!
Apparently I was following some outdated instructions. This worked fine for me:
Completely remove anything I'd already done with the modification (a
fresh start)
sudo apt-get install python-pip
pip install --user git+git://github.com/Lokaltog/powerline
Add the following to your .vimrc
python from powerline.vim import setup as powerline_setup
python powerline_setup()
python del powerline_setup
set laststatus=2
call vundle#end() (only applicable if you use Vundle)
You should then download the latest version of the Powerline Symbols OpenType font (use the commands below)
cd ~
wget https://github.com/Lokaltog/powerline/raw/develop/font/PowerlineSymbols.otf
Move the downloadef file to one of your font directories (either ~/.local/share/fonts/ or ~/usr/local/share/fonts as ~/.fonts is deprecated and won't be used in future versions).
mv PowerlineSymbols.otf ~/.local/share/fonts
Update your system's font chahe
sudo fc-cache -f -v
Download and move the fontconfig file to ~/.fonts.conf
wget https://github.com/Lokaltog/powerline/raw/develop/font/10-powerline-symbols.conf
Create a per-user fontconfig folder if it doesn't already exist
mkdir -p ~/.config/fontconfig/fonts.conf
mv 10-powerline-symbols.conf ~/.config/fontconfig/fonts.conf/
Again, this worked for me, can't guarantee that it will for others but it certainly worked charms for me.
Related
I'm a beginner, I have really hit a brick wall, and would greatly appreciate any advice someone more advanced can offer.
I have been having a number of extremely frustrating issues the past few days, which I have been round and round google trying to solve, tried all sorts of things to no avail.
Problem 1)
I can't import pygame in Idle with the error:
ModuleNotFoundError: No module named 'pygame' - even though it is definitely installed, as in terminal, if I ask pip3 to install pygame it says:
Requirement already satisfied: pygame in /usr/local/lib/python3.7/site-packages (1.9.4)
I think there may be a problem with several conflicting versions of python on my computer, as when i type sys.path in Idle (which by the way displays Python 3.7.2 ) the following are listed:
'/Users/myname/Documents', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python37.zip', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload', '/Users/myname/Library/Python/3.7/lib/python/site-packages', '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages'
So am I right in thinking pygame is in the python3.7/sitepackages version, and this is why idle won't import it? I don't know I'm just trying to make sense of this. I have absoloutely no clue how to solve this,"re-set the path" or whatever. I don't even know how to find all of these versions of python as only one appears in my applications folder, the rest are elsewhere?
Problem 2)
Apparently there should be a python 2.7 system version installed on every mac system which is vital to the running of python regardless of the developing environment you use. Yet all of my versions of python seem to be in the library/downloaded versions. Does this mean my system version of python is gone? I have put the computer in recovery mode today and done a reinstall of the macOS mojave system today, so shouldn't any possible lost version of python 2.7 be back on the system now?
Problem 3)
When I go to terminal, frequently every command I type is 'not found'.
I have sometimes found a temporary solution is typing:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
but the problems always return!
As I say I also did a system reinstall today but that has helped none!
Can anybody please help me with these queries? I am really at the end of my tether and quite lost, forgive my programming ignorance please. Many thanks.
Try it with the problem1
I'm not an expert neither, but I think you need to install both in terminal and python in order to use the program.
python -m pip install pygame
You should actually add the export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" to your .bash_profile (if you are using bash). Do this by opening your terminal, verifying that it says "bash" at the top. If it doesn't, you may have a .zprofile instead. Type ls -al and it will list all the invisible files. If you have .bash_profile listed, use that one. If you have .zprofile, use that.
Type nano .bash_profile to open and edit the profile and add the command to the end of it. This will permanently add the path to your profile after you restart the terminal.
Use ^X to exit nano and type Y to save your changes. Then you can check that it works when you try to run the program from IDLE.
Background
I was having dual boot issues with Windows 10 and Ubuntu 17.10, which eventually resulted in a boot loop and since I need Ubuntu 16.04.3 for an Operating Systems class I decided to load up an ISO into one of my USBs with Rufus, reformat my Windows partitions from GPT to NTFS to get around some nasty bootmg/efi issues and here we are, good as new, except for one thing...
Problem
The only thing I haven't been able to successfully reinstall has been Latex Suite for Vim. Installation last time had been an easy extraction into .vim, but after some deliberation I elected to use Pathogen.
I've installed Pathogen using
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
Which works for color schemes, etc., and every other aspect of latex-suite save for compiling, generating this every time I try to compile (using \ll):
/bin/bash: latex: command not found
I installed texlive which does then allow me to compile using vim, but I'd prefer not to use this solution if I don't have to (in fact I've already removed it, its more of a plan b for now given it's obstructive and non-intuitive compilation errors). I looked at the other questions asking how to install Latex Suite through pathogen and didn't see anything else similar to what I'm working on; below is self-explanatory in regards to installation structure.
~/.vim/bundle$ ls
vim-archery vim-latex-1.10.0
Obvious running pdflatex and latex can't be found because they are not in my $PATH but I was under the impression that with a good, recommended package manager like Pathogen I wouldn't need to which is what originally raised the red flag for me as its whole job is to modify the runtime path. I thought maybe trying sudo vim text.tex might work in case there hadn't been adequate permissions for Pathogen to modify runtime path but no dice.
.vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
colorscheme archery
let g:tex_flavor='latex'
set sw=2
Hi i have vim6 and upgraded to vim7.
I have both versions. vim6 runs fine.
Upgraded vim7 runtimepath has
/usr/local/share/vim/... this path does not exist, contain anyfiles
I am trying to get the colorscheme to work. When I set syntax on, I get that /usr/local/share/vim/syntax/syntax.vim not found error.
So i found the syntax.vim at ~/vim/runtime/syntax/syntax.vim
So I updated the runtimepath using
execute pathogen#infect('bundle/{}', '~/vim/runtime/{}')
the old vim still works, and has updated runtimepath. the new vim73 still has the updated runtimepaths , but when on syntax on it gives an error looking for the file at the old path that never existed.
so how do i remove path from the runtimepath
i also
thanks
edit
upgrade was to 7.4 from 7.3.547
compiled with python as follows:
./configure --enable-pythoninterp --with-features=huge --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/
make
hack
whats wrong with just ln -s ~/vim/runtime/ /usr/local/share/vim/ ?
or just copy the file that i need to get syntax, and hopefully color ..
With a path of /usr/local/share/..., it looks like you've compiled Vim yourself from the sources. sudo make install should have taken care of the copying of the runtime files to that location. What you did with Pathogen is definitely not the right way to fix it.
Unless you're on a very old or poorly maintained Linux distribution, it should be possible to obtain a current Vim package (that is, a 7.4 version) through your distribution's package manager (on Debian-based systems, it's commonly called vim-gnome). Unless you need to have the bleeding edge version (unlikely in your case with the former Vim 6), or incorporate custom patches, that is the easy and recommended approach.
I'm on a fresh Virtualbox install of CentOS 6.4.
After installing zsh 5.0.2 from source using ./configure --prefix=/usr && make && make install and setting it as the shell with chsh -s /usr/bin/zsh, everything is good.
Then some time after, after installing python it seems, it starts acting strange.
Happens with PuTTY and iTerm2 over SSH, does not happen on the raw terminal through Virtualbox.
typing something, then erasing it: rather than removing the char and moving the cursor back, the cursor moves forward.
Typing Ctrl+V then Backspace repeatedly prints out this repeating pattern '^#?'
Running cat from zsh works fine. Prints out '^H' if I type that, backspaces like normal if I type normal backspace.
Surely someone's seen this before and knows exactly what the hell it is.
I'm not positive yet, but it seems that installing oh-my-zsh can fix this. But I really want to know what the specific issue is here.
OK , I suggest you try
export TERM=xterm
in your .zshrc configuration
the Changing into Zsh caused the bug.
sigh I knew I solved this before.
It's too damn easy to forget things.
The solution is to compile and apply the proper terminfo data with tic, as I have a custom config with my terminal clients, xterm-256color-italic, that confuses zsh.
There appear to be other ways to configure this stuff too; I basically just need it to be properly set up so italics work everywhere (including in tmux) so hopefully I can figure out how to do this more portably than I am currently.
I encounter the same problem when I manually install ZSH without root, when the backspace turns to blankspace but still functions as Backspace. Finally, I find it is because "ncurses" is not installed well.
tic: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory
? tic could not build /home/user/ceph-data/soft/ncurses-6.1/share/terminfo
After I reinstall the "ncurses", the problem of ZSH backspace is solved. Just for your information.
my $TERM is xterm-256color, by the way.
I'm trying to get VIM to access the system clipboard. As I see it, here are my options:
Recompile VIM and specify that access to the clipboard, per this post.
Install a newer version of VIM using homebrew, per this post.
I'd prefer to do the second option. Does anyone know if this will actually solve the problem I'm having? Also, are there other solutions to this copy/paste problem that haven't been listed here?
MY SOLUTION: I ended up installing MacVim and making it the default Vim. I found this post helpful. I ran this command:
brew install macvim --override-system-vim
then modified my .bash_profile and that was it.
You are probably using a version of Vim that was not built with clipboard support. Of course the solution to this "problem" is to use a version of Vim that is built with clipboard support.
What does $ vim --version say?
There are many answers on SO describing your options, either related to Ruby or Python support or to clipboard support. The solution is the same every time: install a proper build. Just pick the process you are most comfortable with.
The absolute simplest solution is to install MacVim and use the bundled mvim script to run MacVim on the command line. It's totally painless and guaranteed to work.
I don't recommend building from the sources as it can be a needlessly frustrating task.
Homebrew and MacPorts are also good options but I don't like all the symlinking that is done in Homebrew's case. YMMV.
You have asked the question more than 17 minutes ago. That's more than enough time to try all your options. Did you actually try something?
You can try using the fakeclip plugin.