neovim plugin installed but not loaded - terminal

I switch from VSCODE to neovim because I need free ram but neovim alone is not good as VSCODE not color no snippet, I installed plugins using vim plug but I have to trigger the plugins every time I use neovim by type "PlugInstall", when I quit neovim and back aging nothing there so I need to run "PlugInstall" again, how can I use the plugins without running "PlugInstall" here is my init.vim:
:set number
:set mouse=a
:set smarttap
:set autoindent
call plug#begin(has('nvim') ? stdpath('data') . '/plugged' : '~/.vim/plugged')
Plug 'tpope/vim-sensible'
Plug 'junegunn/seoul256.vim'
" Declare the list of plugins.
Plug 'vim-airline/vim-airline'
" Visual Settings
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
" Color theme plugins
Plug 'joshdick/onedark.vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
Plug 'ctrlpvim/ctrlp.vim' " fuzzy find files
Plug 'scrooloose/nerdcommenter'
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
cell plug#end()
"""""""""""""""""""""""""""""""""""""""""""""""""
syntax on
colorscheme onedark
"""""""""""""""""""""""""""""""""""""""""""""""""
" Visual Settings
"""""""""""""""""""""""""""""""""""""""""""""""""
" For Goyo
let g:goyo_width=85
" For LimeLight
" Color name (:help cterm-colors) or ANSI code
let g:limelight_conceal_ctermfg = 'gray'
let g:limelight_conceal_ctermfg = 240
" Color name (:help gui-colors) or RGB color
let g:limelight_conceal_guifg = 'DarkGray'
let g:limelight_conceal_guifg = '#777777'
" highlight line
let g:limelight_bop = '^.*$'
" let g:limelight_eop = '\n'
let g:limelight_paragraph_span = 0
"""""""""""""""""""""""""""""""""""""""""""""""""
" UI Settings
"""""""""""""""""""""""""""""""""""""""""""""""""
" Keep cursor in the middle of the page, useful for editing text
set so=999
" Turn limelight on by default
" autocmd VimEnter * Limelight
" Turn Goyo on by default
autocmd VimEnter * Goyo
" autocmd VimEnter * AirlineToggle
" In Goyo, if airline is turned on, do nto show scratch area
" autocmd! User GoyoEnter nested set eventignore=FocusGained
" autocmd! User GoyoLeave nested set eventignore=
I use MX-Linux

you have "cell plug#end()", it should be call plug#end().
Maybe that is the origin of the problem or did you copy it wrong?

Related

How do I setup Displays to change via keyboard shortcut or "Hotkey'?

I work with 2 monitors on macOS. Under System Preferences >> Displays >> Appearances, I can change the display setup so that monitors are either side by side, one on top of the other, etc.
I often need to change the setup from side by side to one below the other, and it's painful to have to go into System Preferences and change it manually every time.
How do I go about setting it up so it does it automatically when I press some "hotkey" or keyboard shortcut?
I have access to Alfred for Mac so can code in custom workflows which should help achieve this.
Any ideas would be much appreciated!
Here's a script that calls a python script to switch between display sets. It's only set up to change the relative position of the second display, but it can easily be expanded to work with three or more displays.
Note that you don't have to be precise about the new position. Quartz will automatically adjust things to give the nearest configuration in which the display spaces touch seamlessly.
set displaySet to first item of ¬
(choose from list {"On left", "On right", "On top", "On bottom"} ¬
with prompt "Choose position for second display.")
(* assuming 1280 x 800 pixel displays *)
if displaySet is "On top" then
changeSecondDisplayOrigin(0, -800)
else if displaySet is "On bottom" then
changeSecondDisplayOrigin(0, 800)
else if displaySet is "On left" then
changeSecondDisplayOrigin(-1280, 0)
else
changeSecondDisplayOrigin(1280, 0)
end if
on changeSecondDisplayOrigin(x, y)
do shell script "
/usr/bin/python <<END
import objc
import Quartz
from Quartz.CoreGraphics import CGGetActiveDisplayList
from Quartz.CoreGraphics import CGBeginDisplayConfiguration
from Quartz.CoreGraphics import CGConfigureDisplayOrigin
from Quartz.CoreGraphics import CGCompleteDisplayConfiguration
(activeErr, activeDisplays, displayCount) = Quartz.CGGetActiveDisplayList(2, None, None);
secondDisplay = activeDisplays[1];
(configErr, displayConfigRef) = CGBeginDisplayConfiguration(None);
moveErr = CGConfigureDisplayOrigin(displayConfigRef, secondDisplay, " & x & ", " & y & ");
completeErr = CGCompleteDisplayConfiguration(displayConfigRef, 2);
END"
end changeSecondDisplayOrigin

Xamrin forms Display alert height

bool install = await DisplayAlert("Version " + jsonVersion + " available", "New version of application available. Please, update for new features. \n" + " \n " + "What's new in this release:\n \n" + releaseNotes, "Install Now", "Later");
How can i manage the height of the alert.
There is no customization for xamarin forms display alerts. If you want a customization I think you have to use a DependencyService and call OS Alert. or use nuget like this.
https://github.com/rotorgames/Rg.Plugins.Popup

OSX + PhpStorm: Disable non-breaking spaces

How can I remove the non-breaking spaces that appear when I click Shift + Alt + Space? They are really annoying when writing code since they produce errors.
I have tried adding the following to DefaultKeyBinding.dict:
{
"~ " = ("insertText:", " ");
}
I would like it to work in both Coda + PhpStorm. Thanks!

Window("hwnd:=" & handle).Restore is causing Object not visible error

I have an application that opens up some new tabs. I'm trying to cycle through these tabs, look at them, and then close them.
Dim tab_children, oDesc
Set oDesc = Description.Create
oDesc("micclass").value = "Browser"
Set tab_children = Desktop.ChildObjects(oDesc)
Dim title, handle, cTime
For i = 0 To tab_children.Count-1 Step 1
title = tab_children(i).GetROProperty("title")
handle = tab_children(i).GetROProperty("hwnd")
Window("hwnd:=" & handle).Restore
msgbox title & ": " & handle
Next
When we try to execute the .Restore, I receive an "object not visible" error. The tab that we're trying to restore is not the one that has focus, could that be the issue and if so how can we resolve it? I was under the impression that .Restore would bring that tab into focus based off of this thread, http://www.advancedqtp.com/old_forums/viewtopic.php?t=1970
The IDE I'm using is QTP, the Browser is IE.
A potential work around that I've been thinking about:
After the application opens up the new tabs, the last opened tab has focus. If we close that one, the 2nd to last has focus, all the way down to the original application's tab. Perhaps there's a way to utilize this information.
Restore has worked for me in the past, try using Activate-
Window("hwnd:=" & handle).Activate
Edited: Just tested the following and its working on my machine-
'Create Browser Descriptor
Set oBrowser=Description.Create
oBrowser("micclass").Value="Browser"
'Get the child objects
Set oBrowser=Desktop.ChildObjects(oBrowser)
totalcount = oBrowser.Count-1
For i=0 to totalcount
If Browser("micclass:=Browser", "index:="&i).Exist(0) Then
'get the hwnd everytime there's an iteration
ohwnd= Browser("micclass:=Browser", "index:=" & i).GetROProperty("hwnd")
'For debugging purposes
name = Browser("hwnd:="&ohwnd).GetROProperty("title")
msgbox name
Set oBrowser=Browser("hwnd:="&ohwnd)
'Page descriptor
Set oPage=Description.Create
oPage("micclass").Value="Page"
Set oPage=Browser("hwnd:="&ohwnd).ChildObjects(oPage)
For n=0 to oPage.Count-1
If oPage(n).Exist(0) Then
oBrowser.Close
Exit For
End If
Next
End If
Next
If you want to close only a particular page you can use the GETROPREPERTY("Title") in the If loop - If oPage(n).Exist(0)

Populate text field with variable and show text

Here's my code:
set todayDate to do shell script "date '+%Y/%m/%d'"
set salesRef to "COMPANY-AB" & "-" & theCustomerInitials & "-" & todayDate & "-" & theCustomerID
set the clipboard to salesRef as text
display dialog salesRef as text buttons {"OK"} default button 1
Here's the UI: http://i.imgur.com/sfRnpr6.png
I'd like to make the text 'Copied!' appear when the successfully completes the clipboard line, but remain hidden until then, and also populate the text field at the bottom with the 'salesRef' variable, so the user get's an output.
Essentially then, I'll be able to remove the display dialog. But I can't work out how to do this :(
Successfully managed this by adding these lines:
property theTextField : missing value
…
theTextField's setStringValue:salesRef
Then created a connection to the text field in IB by control dragging from the App Delegate to the text field, and selecting the property.
Are you ok with NSAppleScript?
if so here is an example:
NSAppleScript *myScriptThatShouldGimmeStuff = [[NSAppleScript alloc] initWithSource:
#"return (text returned of (display dialog \"gimme your input:\" default answer \"\" buttons {\"Ok\"} default button 1))"];
//this previous line is the applescript
NSAppleEventDescriptor *theStuff = [myScriptThatShouldGimmeStuff executeAndReturnError:nil];
self.myTextBoxToPutInputIn.stringValue = [theStuff stringValue]; //[theStuff stringValue] is the result returned
/|\
/ | \
/ | \
|
|
//don't forget to change this
//(I didn't comment out the arrow because i want xcode
// to throw you an error so you don't forget to change that).
So it is not clear from you code what you are doing, but IF you are using ASOC, then you have to define OUTLETS to the controls in your UI, and then you just set the .stringValue of the outlet to whatever string you want to appear in them.
If you don't know how to set up outlets, watch this video and download the example code (look for INTRO VIDEO on the page):
http://www.macosxautomation.com/applescript/develop/index.html
Or for another step-by-step example, here:
http://asobjcresources.weebly.com/getting-a-text-field-input.html

Resources