Git Product home page Git Product logo

roku.vim's Introduction

roku.vim

overview

a vim plugin for roku development - provides brightscript language support (syntax highlighting, folding, section movement, indentation, etc) as well as channel installation/packaging from within vim.

roku.vim screenshot

installation

Vundle

add this line to your .vimrc:

Plugin 'entrez/roku.vim'

then run the following in vim:

:source %
:PluginInstall

VimPlug

add this line to your .vimrc:

Plug 'entrez/roku.vim'

then run the following in vim:

:source %
:PlugInstall

Pathogen

run the following commands in the terminal:

cd ~/.vim/bundle
git clone git://github.com/entrez/roku.vim.git

roku.vim's People

Contributors

entrez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

roku.vim's Issues

running `:RokuInstall` from a file in your current directory causes error

expected behavior

:RokuInstall should display a message like this on success:

compressing channel & uploading to roku (xx.xx.xx.xx)
application received: 639321 bytes stored. install success.

actual behavior

when run from a file in your current directory, its output includes an error message like this:

compressing channel & uploading to roku (xx.xx.xx.xx)
/Users/entrez/roku.vim/roku_scripts/install: line 59: cd: manifest: Not a directory application received: 639321 bytes stored. install success.

steps to reproduce the problem

  1. open a Roku project file in vim or neovim with roku.vim installed:
    $ vim ~/channels/test/manifest
  2. change the editor's current directory to the one containing the file:
    :cd %:p:h
  3. run :RokuInstall or :RokuInstall <device>:
    :RokuInstall
  4. see results

other information

shell version(s): bash v5.0.7, zsh v5.7.1, fish v3.0.2
vim version(s): vim v8.1.1900, neovim v0.3.7

xml item filetype set to brs

issue

xml items can have their filetype forced to brs, even if they are already being handled by an xml syntax plugin, etc.

to reproduce

run in terminal:

$ vim ~/path/to/my/channel/components/screen1/screen1.xml

the filetype of the xml item should be correct at this point, but it can be (temporarily?) overridden when a brightscript file is opened:

:cd %:p:h
  /Users/entrez/path/to/my/channel/components/screen1
:set ft?
  filetype=brs
:new screen1.brs

at this point the syntax highlighting of the xml document will change; we can confirm the filetype has been reset:

:exe "norm! \<c-w>j"
:set ft?
  filetype=brs

using :edit at this point seems to restore the correct xml filetype, and attempting to repeat the same steps won't do anything to it.

dummied out entries in /etc/hosts are not ignored

issue

if g:roku_ip is set to a hostname defined in the local hosts file (e.g. rokutv), /etc/hosts is searched for a matching line. this search is very simple, though, and doesn't correctly exclude lines that start with the comment character #. in fact, those hash characters may even be included in the ip address extracted from the file, which obviously is no good.

to reproduce

run the following:

$ sudo echo '#10.192.21.29 notvalid' >> /etc/hosts
$ echo 'let g:roku_ip = "notvalid"' >> ~/.vimrc
$ vim channels/mychannel/manifest

then in vim:

:RokuInstall

`:RokuInstall` produces error messages when run from deleted dir

original title: `:RokuInstall` produces error messages in zsh

expected behavior

:RokuInstall generally produces two lines of output:

compressing channel & uploading to roku (rokutv)
application received: 639321 bytes stored. install success.

actual behavior

when running from a since-deleted cwd, :RokuInstall produces additional unexpected error messages:

compressing channel & uploading to roku (rokutv)
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory application received: 2298299 bytes stored. install success.

steps to reproduce the problem

  1. create a new directory, move into it, and delete it:
    $ mkdir ~/cwdtest && cd ~/cwdtest && rmdir ~/cwdtest
  2. open a Roku project in neovim with roku.vim installed:
    $ nvim ~/channels/test/manifest
  3. run :RokuInstall or :RokuInstall <device>:
    :RokuInstall
  4. see results

other information

shell version: zsh 5.7.1
vim version: neovim v0.3.7

device returns server error when schema omitted

when I have used curl to contact my roku boxes prior to today, the results have been the same no matter whether the address was written as ${ROKU_IP}/plugin_package or http://${ROKU_IP}/plugin_package. starting today, however, (or potentially even earlier, since I haven't sideloaded a new app in the ~two days before this) curl fails to successfully contact the device unless the schema is included in the address or the port is explicitly specified. this means that the installation and packaging commands in this plugin are not working at all for me.

I don't know if this is due to an update to the roku OS or something else (could even be related to macos 10.15 I guess??), but the fix is pretty easy—just prepend http:// before the device IP when installing or packaging a channel.

readme screenshot

i read something about hosting screenshots which appear in README.md in an issue, so that they're not included when cloning the repo; figured i'd see how it works.
screenshot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.