![]() ![]() One of the most obvious differences between the graphical version of Vim and the textual version of Vim is that the graphical version of Vim includes menus. If you do, you'll be looking for something like Vim-X11, Vim-gnome something similar. Of course Linux users can use the package manager for their OS and install it from there if you'd like. You'll find the official versions of Vim at vim.org. So if you don't find MacVim installed on your Mac system or GVim reports command not found on a Linux system, then you'll need to install the graphical version. Just because you have the textual version of Vim installed, doesn't mean you have the GUI version installed as well. You can also use the menuing system for your graphical environment. First, you can the graphical version of Vim from the command line by typing GVim. On a Linux or Unix system, you have a couple of options. Of course you can also search for it using Spotlight. If you're using a Mac, you'll find MacVim in your applications folder. You can also use the Windows Search feature and look for GVim that way. If there are multiple options, select GVim which is the graphical version of Vim. For example, if you're on a window system you can use the Start menu to navigate to Vim. Start the graphical version of Vim like you would any other graphical application on your OS. These options aren't available to you in the command line only version of Vim. For example, if you want to access your systems clipboard or you want to use the File Explorer to open files, or you want to use the scroll wheel on your mouse to skim through a document. ![]() Yet another reason to use the GUI version of Vim is to take advantage of GUI only features. It makes sense to run Vim as a standalone graphical application as opposed to running it in a terminal window. It's just a heavy, graphical, focused environment. For example, I don't know many people who leave a command prompt open all the time on their window system. Another reason you might want to use a graphical version of Vim is that you really don't use the command line as part of your normal workflow. This way you don't have to use one editor in one place and another editor in another place. That graphical environment might be your Linux desktop, a Mac, or even a Window system. For example, if you're a Linux admin and you work with Vim all day on all of your servers, you might want to leverage that knowledge even when you're working in a graphical desktop environment. With that said, there are a couple of good reasons to use a graphical version of Vim. So anything you already know how to do in Vim will also work in the GUI version too. The good news is that all of that knowledge you already have about Vim is transferable to the graphical user interface or GUI version of Vim. Silent! let l:colour = synIDattr(hlID(a:val.hi), a:val.All the other lessons in this course have covered topics related to the command line or textual user interface version of Vim. The next part is a couple of functions to map over this list and set each item using term_setansicolors: function MapAnsiTermColours(key, val) I use the ap/vim-css-color plugin which will shows me colours if I have hex codes on the screen (.it's awesome). The position matters, so if you don't like these you can swap them around, or even change the hi values (do :hi Directory to see the hex codes for the Directory highlight for example). If you make a list of highlight names first, you can use these to set the current highlight colour to the gui terminal using the functions synIDattr (syntax ID attribute) and hlID (highlight ID).įirst make a list of highlight names with a foreground value fg or the background value bg. I might have a look at doing it so I'll come back here and post more if it works. The next bit I haven't got around to trying but theoretically you can just make your own array of hex colours and pass them into term_setansicolors: :call term_setansicolors(bufnr(), )Īfter that you could make your own mapping that opens the terminal with that function call included in it, or do something more complicated that gets the colours from your current colorscheme and set them automatically. Then you can paste them to have a look at the actual colours and change them. You can also set the result to your register with: :let = join(term_getansicolors(bufnr)) The get recieves the buffer number that the terminal is on and returns an array of hex codes. There's also another one called term_setansicolors. The terminal colours are set separately from :colorscheme, there's a function you can use to see what the current colours are called term_getansicolors. ![]()
0 Comments
Leave a Reply. |